Registered StackHub users may elect to receive email notifications whenever a new package version is released or a comment is posted on the forum.
There are 3 watchers.
List all the sheet names found in the Excel document represented by the provided POIReader instance.
Examples:
poiReaderOpen("myFile.xlsx").poiListSheets
Side effects:
Read the content of a specific sheet, identified by index, returned as a Str which can be further parsed by the calling Axon function.
Examples:
poiReaderOpen("myFile.xlsx").poiReadSheetByIndexAsStr(0)
Side effects:
Read the content of a specific sheet, identified by name, returned as a Str which can be further parsed by the calling Axon function.
Examples:
poiReaderOpen("myFile.xlsx").poiReadSheetByNameAsStr("Sheet1")
Side effects:
Close the provided POIReader instance.
Examples:
poiReaderOpen("myFile.xlsx").poiReaderClose
Side effects:
Construct an empty new POIReader. Useful when writing data to a sheet and then saving to new file.
Examples:
poiReaderNew() poiReaderNew({separator:",", formattedCells:true})
Side effects:
Construct a POIReader from the provided file name When called from Axon, the filename must start with "io/", so assume that and prefix with project absolute path
Examples:
poiReaderOpen("myFile.xlsx") poiReaderOpen("myFile.xlsx", {separator:","})
Side effects:
Construct a POIReader for the provided binary byte buffer. The Buf instance should be the binary contents of any of the support Excel file versions.
Examples:
poiReaderOpen(smbReaderOpen("10.0.0.1").smbReaderConnect("shareName").smbReaderReadBinaryFile("dirName", "myFile.xlsx"))
Side effects:
Write the Grid of data to a specific sheet, identified by name.
Examples:
poiReaderOpen("test.xlsx") .poiWriteSheetData( "Sheet1", [{name:"n1", age:12},{name:"n2", age:10}].toGrid, { writeColHeaders:true, clearSheet:false, rowLocation:1, colLocation:1, dateFormat:"YYYY-MM-DD", dateTimeFormat:"YYYY-MM-DD hh:mm:ss" }) .poiSaveToFile("test.xlsx") .poiReaderClose
If the sheet of the specified name doesn't exist, it will be created.
Options work as follows:
rowLocation
is 1 based. Default is 0. Any value < 1 indicates append the data after existing rows.colLocation
is 1 based. Default is 1.clearSheet
when true will cause all rows after rowLocation
to be cleared. When false, only the rows where the data lands will be replaced.dateFormat
defaults to "YYYY-MM-DD", so any cell in the Grid that is of type date, will be formatted correctly in ExceldateTimeFormat
defaults to "YYYY-MM-DD hh:mm:ss", so any cell in the Grid that is of type dateTime, will be formatted correctly in ExcelSide effects: