The official documentation for Apache POI
create methods like:
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(final NPOIFSFileSystem fs, String password)
create(InputStream inp, String password)
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.
In Maven Central repository https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml I could find several newer versions of POI are published already.
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:
* 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.
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.
Thanks for teaching me about this libraries management. I didn’t know about it prior…
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.