ccPoiToolsExt

POI Tools
ccPoiToolsExtAxon funcs

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 2 watchers.

v1.1.2

getDateTimeFromExcelDouble
getDateTimeFromExcelDouble(excelSerialDate, tz: "UTC", checked: true)
Fantom signature:
@Axon static Obj? getDateTimeFromExcelDouble(Number excelSerialDate, Str tz := "UTC", Bool checked := true)
poiListSheets
poiListSheets(poi)

List all the sheet names found in the Excel document represented by the provided POIReader instance.

Examples:

poiReaderOpen("myFile.xlsx").poiListSheets

Side effects:

  • Returns the array of sheet names found
Fantom signature:
@Axon static Str[] poiListSheets(POIReader poi)
poiReadSheetByIndexAsStr
poiReadSheetByIndexAsStr(poi, sheetIndex)

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:

  • Returns the contents of the sheet at a specific index as a Str, suitable for parsing by ioReadCsv
Fantom signature:
@Axon static Str poiReadSheetByIndexAsStr(POIReader poi, Number sheetIndex)
poiReadSheetByNameAsStr
poiReadSheetByNameAsStr(poi, sheetname)

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:

  • Returns the contents of the named sheet as a Str, suitable for parsing by ioReadCsv
Fantom signature:
@Axon static Str poiReadSheetByNameAsStr(POIReader poi, Str sheetname)
poiReaderClose
poiReaderClose(poi)

Close the provided POIReader instance.

Examples:

poiReaderOpen("myFile.xlsx").poiReaderClose

Side effects:

  • Closes completely the provided POIReader instance.
Fantom signature:
@Axon static Void poiReaderClose(POIReader poi)
poiReaderOpen
poiReaderOpen(filename, opts: Etc.emptyDict())

Construct a POIReader for 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", ",")

Side effects:

  • Returns an instance of POIReader which must be passed in on all subsequent calls that wish to use this reader
Fantom signature:
@Axon static POIReader poiReaderOpen(Str filename, Dict opts := Etc.emptyDict())
poiReaderOpenBuf
poiReaderOpenBuf(buf, opts: Etc.emptyDict())

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:

  • Returns an instance of POIReader which must be passed in on all subsequent calls that wish to use this reader
Fantom signature:
@Axon static POIReader poiReaderOpenBuf(Buf buf, Dict opts := Etc.emptyDict())
Published by Crowley Carbon

Packages by Crowley Carbon

Free packages