Apache POIApache POI
Watch
0
Star
1
Category
Interoperability
Works with
Tags
Version
1.0.0
Last updated
2019-10-16
Repository
License
Download
Discuss
Details
Version history
Issues

What's new in this version

Initial Release

ObjectScript part for apache-poi integration

apache-poi-os

ObjectScript part for apache-poi integration. Allows reading xlsx.

Installation

  1. Download latest release and import it into any namespace.
  2. Download java files: poi archive and poi.jar from latest release.
  3. Extract archive and copy poi.jar into one directory, later referenced as <DIR-WITH-JARS>. Caché should have access to this directory.
  4. Execute: set ^POI("DIR")=##class(%File).NormalizeDirectory("<DIR-WITH-JARS>")
  5. Create Java Gateway: Write $System.Status.GetErrorText(##class(isc.poi.Utils).createGateway(name, home, path, port)), where:
    • name is a name of the Java Gateway, defaults to POI.
    • home path to Java 1.8 JRE. Defaults to JAVA_HOME environment variable.
    • path is a path to jars, should be set automatically.
    • port Java Gateway port. Defaults to 55556.
  6. Load jar into Caché: Write $System.Status.GetErrorText(##class(isc.poi.Utils).updateJar())
  7. Check that everything works: Write $System.Status.GetErrorText(##class(isc.poi.Utils).getBook(file, .book))

API

Excel books are loaded into isc.poi.Book objects. Check it for API documentation.