|
def | __str__ (self) |
|
def | __repr__ (self) |
|
def | shape (self) |
|
def | shape (self, val) |
|
def | remove_DC (self) |
|
def | has_DC (self) |
|
def | from_file (self, fname, keep_DC=True, dctype='', sel='', sparks=False) |
|
def | lt_range (self, use_name=True) |
|
def | get_book (self) |
|
def | get_labels (self, type_='L') |
|
def | set_labels (self, labels, type_='L', offset=0) |
|
def | tabcolor (self) |
|
def | tabcolor (self, rgb) |
|
def | __str__ (self) |
|
def | activate (self) |
|
def | destroy (self) |
|
def | __init__ (self, obj) |
|
def | __del__ (self) |
|
def | __str__ (self) |
|
def | __bool__ (self) |
|
def | index (self) |
|
def | get_str (self, prop) |
|
def | get_int (self, prop) |
|
def | get_float (self, prop) |
|
def | set_str (self, prop, value) |
|
def | set_int (self, prop, value) |
|
def | set_float (self, prop, value) |
|
def | method_int (self, name, arg='') |
|
def | method_float (self, name, arg='') |
|
def | method_str (self, name, arg='') |
|
def | lt_exec (self, labtalk) |
|
def | name (self) |
|
def | name (self, value) |
|
def | lname (self) |
|
def | lname (self, value) |
|
def | comments (self) |
|
def | comments (self, value) |
|
def | show (self) |
|
def | show (self, value) |
|
def | usertree (self) |
|
def | usertree (self, tr) |
|
def | userprops (self) |
|
base class for data sheets, like worksheets and matrix sheets
def originpro.base.DSheet.from_file |
( |
|
self, |
|
|
|
fname, |
|
|
|
keep_DC = True , |
|
|
|
dctype = '' , |
|
|
|
sel = '' , |
|
|
|
sparks = False |
|
) |
| |
Imports data from a file using a Data Connector.
Parameters:
fname (str): File path and name to import.
keep_DC (bool): Keep the Data Connector in the book after import
dctype (str): Data Connector name, like "Import Filter", "MATLAB", "NetCDF", if not specified, CSV or Excel connector will be used based on file name
sel (str): selection in the file, this will depends on the connector
sparks (bool): Allows sparklines or not, True will follow GUI setting to add sparklines, False will disable it completely
Returns:
None
Examples:
wks=op.find_sheet()
fn=op.path('e') + 'Samples\\Import and Export\donations.csv'
wks.from_file(fn, False)#remove connector after import to allow further edit of data
wks2=op.new_sheet()
wks2.from_file(op.path()+'test.xlsx')#assuming you have this in UFF(user file folder)