Questions tagged [hssf]

HSSF provides Java APIs to read / write Microsoft Excel 2003 and before (.xls) files. This tag should be used for questions about accessing Excel 2003 files from Java applications. HSSF is managed under the Apache POI Project.

HSSF provides Java APIs to read / write Microsoft Excel 2003 and before (.xls) files. This tag should be used for questions about accessing Excel 2003 files from Java applications. HSSF is managed under the Apache POI Project.

More information on HSSF, the bug tracker and download links are available from http://poi.apache.org/spreadsheet/index.html

If you are starting with Apache POI, you may find the Busy Developer's link very useful: http://poi.apache.org/spreadsheet/quick-guide.html

117 questions
2
votes
1 answer

How to set Jasper to use XSSF?

In a existing system already use jasper 5.0 and as I know it use poi HSSF to generate xls data, but now as the application grow up, the report have a problem with a big count transaction to generate. I have search for the solution and found POI…
Angripa
  • 159
  • 2
  • 4
  • 14
2
votes
0 answers

How to print a human-readable version of a HSSFCellStyle (or ExtendedFormatRecord)?

I'm currently trying to debug some legacy POI/HSSF code (v.3.9) and wonder if there's something to easily debug/display the contents of a org.apache.poi.hssf.usermodel.HSSFCellStyle (or its inherent cumbersome…
maxxyme
  • 2,164
  • 5
  • 31
  • 48
2
votes
1 answer

Apache POI: comments in empty cells in an empty row

I have a big problem with Apache POI. A B C D 1 text text text text 2 comment 3 text text text text In this example row 2 is empty, C2 has no text, but a comment. If I want to…
Smoothi
  • 283
  • 1
  • 3
  • 15
2
votes
1 answer

HSSFCell converts Integer to Double

I want to read an Excel Sheet and I am using HSSF. The content of an example row is: Cell0: Cell1: A23456 123 Now I want to read the Cell1 as String "123". HSSF recognizes that 123 is a numeric value (getCellType returns CELL_TYPE_NUMERIC ==…
mrbela
  • 4,477
  • 9
  • 44
  • 79
2
votes
0 answers

Apache POI: Diagonal border in XSSFWorkbook

I found the XSSFCellBorder to support diagonal border styles as well and I want to use them, but I haven't found any way to get a XSSFCellBorder from an XSSFCellStyle so I can apply them in the usual way. How can I set the diagonal border for a…
AlexR
  • 2,412
  • 16
  • 26
2
votes
1 answer

Can I create a freeze pane and a split pane in the same sheet at once using Apache POI?

I am using Apache POI XSSF and HSSF API. If I do this, it only freezes the pane (no split): sheet1.createSplitPane(8000, 5000, 0, 0, Sheet.PANE_LOWER_RIGHT); sheet1.createFreezePane(0, 1); and if I do this, it only splits the pane (no…
Tejus Prasad
  • 6,322
  • 7
  • 47
  • 75
2
votes
1 answer

HSSF Reading Blank Cell getting Null Pointer Exception

I am working on the utility which dumps the excel sheet content to the database (postgres 9.2 in my case) , The application is working very smoothly when all the cells are filled but whenever i am trying to run my code on the excel sheet which is…
Er. Junaid
  • 33
  • 1
  • 5
2
votes
2 answers

Obtain textbox value from Excel in Java

I have an Excel file and I need to read a value from a textbox inside that Excel file. I am using org.apache.poi library and I tried to obtain the value in the following way: List obj=workbook.getAllEmbeddedObjects(); for (int…
Mike
  • 111
  • 2
  • 9
2
votes
1 answer

POI SS UserModel Performance

When using SS UserModel to parse xls files, whats the difference in performance compared to HSSF?
user1864519
  • 433
  • 4
  • 6
1
vote
1 answer

Why is a cloned HSSFCellStyle not equal to the style it was cloned from?

I am using one HSSF Workbook as a template for another. Because of how that works, as you probably know if you're reading this, I cannot simply take a cell from workbook 1 and set its style to the CellStyle from workbook 2. The way this is…
Anonymous
  • 3,334
  • 3
  • 35
  • 50
1
vote
1 answer

how to restrict XLS2CSVmra to one sheet only?

i need to read XLS(not XLSX) file efficiently and I found the XLS2CSVmra example of POI, the problem is that I need to read one sheet only (i have sheet name sheet index etc.). Is there any way to restrict reading to one sheet only? Any help will be…
yan
  • 149
  • 3
  • 11
1
vote
0 answers

How to perform iterative calculations while working on an excel file (hssfworkbook) in scala?

Needed to perform iterative calculation over circular references (condition where formula refers to its own cell either directly or indirectly) while creating an excel (using HSSFWorkbook) in scala. Found one of the probable solutions -…
1
vote
0 answers

How to get correct HSSFFont .IsBold Value for first Char in HSSFRichTextString using NPOI?

I was coding a function that has a HSSFCell as input and returns the input of the cell formated with .xml tags ( etc.) in order to do so I iterate trough the HSSFRichTextString and check the font for each character. Everything works as expected as…
Flo_Maxl
  • 11
  • 2
1
vote
1 answer

Binary file encryption with Apache POI

I'm trying to apply encryption to a binary xls file with Apache POI. While I can successfully encrypt xml based files, if I encrypt a binary one I can't open it and I get the wrong password error. This is my code: @Test public void testEncryption()…
firegloves
  • 5,581
  • 2
  • 29
  • 50
1
vote
1 answer

NPOI how to resize picture

I can place the image into the excel but it takes up cells A1 to around 3/4 of D12. I tried searching up ways to resize the image but most of the links provided were deleted from previous users. My goal is to put the image into the cell A1 and…