Missing WorkbookFactory methods

The official documentation for Apache POI WorkbookFactory shows create methods like:

  • create(boolean xssf)
  • create(DirectoryNode root)

but none of those are available in Katalon Studio’s version of WorkbookFactory. Indeed, when I check out the source code, it is neutered of many of the methods that are documented; it only contains the following:

  • create(POIFSFileSystem fs)
  • create(NPOIFSFileSystem fs)
  • create(final NPOIFSFileSystem fs, String password)
  • create(OPCPackage pkg)
  • create(InputStream inp)
  • create(InputStream inp, String password)
  • create(File file)
  • create(File file, String password)
  • create(File file, String password, boolean readOnly)

None of these methods seem to do what I need: create an Excel file, from scratch, that doesn’t already exist on the disk. It seems like either of the two missing methods would do that for me…

I am on Katalon Studio version 8.3.5. How can I get these missing methods, that are on the official documentation, that should be in Katalon Studio’s version of the third-party package?

I am on Katalon Studio version 8.3.0. I can check which version of Apache POI is bundled in Katalon Studio.

In any Katalon Studio project, I can find a file <projectDir>/.classpath. In there I could find a line:

	<classpathentry kind="lib" path="/Applications/Katalon Studio.app/Contents/Eclipse/configuration/resources/lib/poi-3.17.jar"/>

So, Katalon Studio 3.8.0 bundles the version 3.17 of POI.

You can check your own environment.

1 Like

In Maven Central repository https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml I could find several newer versions of POI are published already.

@mwarren04011990

Perhaps you want some of those newer versions of POI.

Have a look at the following Katalon Documentation:

* This feature applies to all libraries in `classpath`, excluding:
  * `com.kms.katalon.*.jar`
  * `selenium-server-standalone-3.141.59.jar`
  * `poi-3.17.jar`
  * `poi-ooxml-3.17.jar`
  * `poi-ooxml-schemas-3.17.jar`
  * `java-client-7.0.0.jar`
  * `io.cucumber.*.jar`
* Excluding those libraries may cause failure of the relevant features.

Therefore, you can not use any of the newer versions of POI in Katalon Studio.

All you can do in Katalon Studio 8.3.x is what POI v3.17 allows you to, and no more.

1 Like

I suppose, POI v3.17 provides you sufficient functionality to create xlsx files. You should try to find out older documentations and tutorials for v3.17 and learn how to. You would easily find them. You should not stick to the latest and greatest versions, which are possibly better than v3.17, but are not mandatory for you. If you definitely want the latest POI, then you should get out of KS.

1 Like

Thanks for teaching me about this libraries management. I didn’t know about it prior…

However,

I’m sorry, but overriding those versions with a more modern version, is somehow going to break the project? What deprecated features from that project are they using? @vu.tran I see you lurking this thread. Care to answer this?

Katalon Studio calls the older version of POI. If you overide POI with newer version, Katalon Studio may hang; you can not predict what will happen at all.