Skip to content
Advertisement

Tag: excel

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,

Opening CSV with UTF-8 BOM via Excel

I create csv file with data by the means of java. And I faced the following well-known issue: the letters in Portuguese were displayed by the wrong way in Excel (when opening by double click). I solved this by UTF-16LE+BOM, but excel started to recognize tabs as columns separators instead of commas. So I looked up for another solution and

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

Advertisement