eBiss 3

Hilfe & Dokumentation

User Tools

Site Tools


en
en:transformation:mappings:funktionen:excel:loadtab

eBiss.Excel.LoadTab

The function eBiss.Excel.LoadTab([Filepath]) loads all entries from the selected file.

Syntax:

eBiss.Excel.LoadTab([Filepath])
eBiss.Excel.LoadTab([Filepath],[ContainsHeader|HeaderLine],[StartLine],[KeyColumn],[ValueColumn],[Tab])

Filepath: The path for the excel file that should be loaded.

ContainsHeader|HeaderLine (optional): Indicates if the excelfile contains a header. If set to false so the first line that is set in StartLine will be treated as a value. Default-Value: 'true'. In case of a numeric value the value is used as header line (see example below)

StartLine (optional): This value decides from which line the excel table should be read. Default-Value: 1

KeyColumn (optional): Determines the key-column. If ValueColumn is not set so everything excluding the Key will be treated as a value. Also accepts a comma-seperated string (e.g. A,C,D) for multiple keys. Default-Value: 'A'

ValueColumn (optional): Determines which columns are values. When not set everything column except the KeyColumn will be treated as a value. Accepted value formats are either a signle column (e.g. B), a comma-seperated string (e.g. A,E,F,G) or two columns seperated by a colon (e.g. D:G),which indicates the start-column and end-column for the values . Default-Value: null

Tab (optional): If more then one table exists in a file so this value decides which one should be read. Takes a 1-based index as a value. Default-Value: 1

Samples:

eBiss.Excel.LoadTab('e:\LokaleDaten\PricatData.xlsx')
eBiss.Excel.LoadTab('e:\LokaleDaten\PricatData.xlsx', 'true', 1, 'F')

Column 'F' is the key column and all columns from A to L except column 'F' will be read.

eBiss.Excel.LoadTab('e:\LokaleDaten\PricatData.xlsx', 'true', 1, 'F', 'E:J')

Column 'F' is the key column and all columns from E to J including column 'F' will be read.

eBiss.Excel.LoadTab('e:\LokaleDaten\PricatData.xlsx', 1, 2, 'F', 'E:J')

Same as eBiss.Excel.LoadTab('e:\LokaleDaten\PricatData.xlsx', 'true', 1, 'F', 'E:J')

eBiss.Excel.LoadTab('e:\LokaleDaten\PricatData.xlsx', 1, 3, 'F', 'E:J')

The first line i read as header and data rows start at line number 3.

Hint: To avoid multiple loads of the excel table you can save the result in a '$$' variable. For example saving in '$$'-Variable. In the following sample also the column index of column 'Liferantenname' is save for furhter use:

The following evaluation in the mapping is possible:

XVar('ExcelTable')/Entries[@Key = '4025018000008']/Values[MakeNumeric(XVar('columnSupplier'))]/@Value
/var/www/pranke.com/hilfe/data/pages/en/transformation/mappings/funktionen/excel/loadtab.txt · Last modified: 2019/12/16 15:51 (external edit)

Page Tools