Skip to content
Advertisement

Tag: apache-poi

Unable to open XLSX file using Apache POI: NoClassDefFoundError

I’m having problems trying to open an XLSX file with Apache POI. My code: Exception thrown: Background: Running JDK 7 on MacOS X (Mavericks) Using NetBeans Imported jars (all from Apache POI binary distribution): poi-3.11-20141221.jar poi-ooxml-3.11-20141221.jar poi-ooxml-schemas-3.11-20141221.jar commons-codec-1.9.jar log4j-1.2.17.jar I can’t even start doing the real stuff, since I can’t even open the book! 🙁 When I saw the exception,

Apache POI – setting left/right print margin in Excel

Is that possible – with apache POI – to set left or right print margin for Excel sheet? The default margins are quite big. I cannot see neither setLeftMargin nor setRightMargin in XSSFPrintSetup, but only header and footer: Is there any kind friend that could help me a little? Answer The sheet margins are not contained in the XSSFPrintSetup object,

Using Apache POI how to read a specific excel column

I’m having a problem in excel while using Apache POI. I can read across rows, but sometimes I’m in a situation where I would like to read a particular column only. So is it possible to read any particular column like only the ‘A’ column only or the column ‘C’ only. I’m using the Java language for this. Answer heikkim

Multiline text in Excel cells

I’m trying to write multiline text to excel cells. But when I open the document, I see only one line until I double-click it for editing, then it becomes two-lined. Why is it so? Thanks Answer You need to set the row height to accomodate two lines of text. You need to set the wrap text = true to get

Limitation while generating excel drop down list with Apache POI

I’m trying to generate an excel file with some validations, I’ve read the poi dev guides for implementing it. During implementation, I got an exception (String literals in formulas can’t be bigger than 255 characters ASCII). POI concatenates all drop down options into ‘0’ deliminated string and checking its length and giving me exception. 🙁 I’m using latest version of

Advertisement