excelimportnode Properties

The Excel Import node imports data from Microsoft Excel in the .xlsx file format. An ODBC data source is not required.

Examples

#To use a named range:
node = stream.create("excelimport", "My node")
node.setPropertyValue("excel_file_type", "Excel2007")
node.setPropertyValue("full_filename", "C:/drug.xlsx")
node.setPropertyValue("use_named_range", True)
node.setPropertyValue("named_range", "DRUG")
node.setPropertyValue("read_field_names", True)

#To use an explicit range:
node = stream.create("excelimport", "My node")
node.setPropertyValue("excel_file_type", "Excel2007")
node.setPropertyValue("full_filename", "C:/drug.xlsx")
node.setPropertyValue("worksheet_mode", "Name")
node.setPropertyValue("worksheet_name", "Drug")
node.setPropertyValue("explicit_range_start", "A1")
node.setPropertyValue("explicit_range_end", "F300")
Table 1. excelimportnode properties
excelimportnode properties Data type Property description
excel_file_type Excel2007  
full_filename string The complete filename, including path.
use_named_range Boolean Whether to use a named range. If true, the named_range property is used to specify the range to read, and other worksheet and data range settings are ignored.
named_range string  
worksheet_mode Index Name Specifies whether the worksheet is defined by index or name.
worksheet_index integer Index of the worksheet to be read, beginning with 0 for the first worksheet, 1 for the second, and so on.
worksheet_name string Name of the worksheet to be read.
data_range_mode FirstNonBlank ExplicitRange Specifies how the range should be determined.
blank_rows StopReading ReturnBlankRows When data_range_mode is FirstNonBlank, specifies how blank rows should be treated.
explicit_range_start string When data_range_mode is ExplicitRange, specifies the starting point of the range to read.
explicit_range_end string  
read_field_names Boolean Specifies whether the first row in the specified range should be used as field (column) names.
scanLineCount integer Specifies the number of rows to scan for the column and storage type. Default is 200.