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
0
votes
1 answer

HSSF apache cell styles - all cells are gray

I create cell styles for HSSFWorkbook: private static HSSFCellStyle createNewColorCellStyle(Map cellStylesMap, HSSFWorkbook workbook, Color color) { if (cellStylesMap.get(color) == null) { HSSFCellStyle cellStyle =…
user8627012
0
votes
1 answer

How to read MS 97-2003 Worksheet through Selenium Webdriver?

Am trying to read the .xls file(MS 97-20003 Worksheet) that is downloaded from our application through selenium webdriver. But am getting the following error: "org.apache.poi.poifs.filesystem.NotOLE2FileException: The supplied data appears to be a…
Rahul
  • 759
  • 3
  • 21
  • 43
0
votes
1 answer

How set cell name for formula in HSSFDataValidation

i want cell value between two cells value. I use HSSFDataValidation for set validation to excel file that create by apache poi but error when execute. source code: HSSFDataValidationHelper dvHelper = new…
Ramin Asadi
  • 281
  • 2
  • 17
0
votes
0 answers

Excel sheet export exception in POI-3.5-beta.jar in android

import org.apache.poi.hssf.usermodel.HSSFCellStyle; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.hssf.util.HSSFColor; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.CellStyle; import…
Ramchandra Singh
  • 530
  • 4
  • 15
0
votes
1 answer

write data into excel file after extracting the paragraphs/Strings from HWPFDocument(.doc files)

Here my code helps me to extract the data from .doc files into paragraphs and specific string search as well.i can take it manual output using eclipse run configuration. but 1) i wanted it to direct output into excel file where it is .doc file.2)…
shravan
  • 23
  • 9
0
votes
1 answer

HSSFCell setCellStyle apply style on all sheet's cell instead the selected cell

I transform a string called sCurrentLine to an Excel's row. Depending if the line is starting with X, Y or Z I color the row. row = sheet.createRow(lines); String[] parts = sCurrentLine.split("\\|"); if…
lapinkoira
  • 8,320
  • 9
  • 51
  • 94
0
votes
1 answer

Export JTable into Excel file

here I am trying to export JTable into excel file...I didn't get any error on console...but on excel sheet I got only column names...my aim is want to show database table in this JTable square, and below this there is Export button,so after clicking…
Vsal
  • 83
  • 2
  • 12
0
votes
0 answers

excel data validation not working after copy paste

I am using the below code to restrict the user from giving an input less than 10 characters, but when I copy and paste the data into the cell it is overriding the validation. How do I solve this? cell =…
Java Team
  • 65
  • 1
  • 9
0
votes
1 answer

creating extra excel file using java and POIExcel util if max rows have been exceeded

I want to create an excel document with 5 sheets, the data for the sheets is dynamic and I have a maximum row limit. currently my approach is creating one sheet at a time, and filling it with data. I am checking if max rows have been exceeded, and…
0
votes
1 answer

Error When trying to use XSSF on Jmeter

I am getting error when trying to create xlsx file using Jmeter. actually I already try using HSSF (for .xls) and it is works fine. But when I am trying to change it using xlsx, I am getting error. I already copy the jar file for poi and poi-ooxml…
Hendrione
  • 225
  • 1
  • 5
  • 18
0
votes
0 answers

JAVA: Export ArrayLists into excel table with NEW sheet everytime

I have two ArraysLists (X and Y) with different number of elements. Now, i want to export them among themselves into an excel-table. X and Y should have their own columns side by side. Example: X = [2 , 6 , 0], Y = [5 , 8 , 3] X | Y ------ 2 | 5…
0
votes
0 answers

Save embedded files from .xls document (Apache POI)

I would like to save all attached files from an Excel (xls/HSSF) without extension. I've been trying for a long time now, and I really don't know if this is even possible. I also tried Apache Tika, but I don't want to use Tika for this, because I…
Nicola
  • 385
  • 1
  • 5
  • 15
0
votes
0 answers

Get document name of embedded file in xls (Apache POI)

I would like to save all embedded Files of a .xls (POI Type: HSSF) File, no matter which embedded filetype it is. So I'm happy if I can save all embedded files without extension. I'm using Apache POI Library 3.7 on Java 7. Now, I'm having trouble…
Nicola
  • 385
  • 1
  • 5
  • 15
0
votes
1 answer

Sort data before exporting to excel

I have the code below, and what this does is basically get my data from my table model and put this into a spreadsheet. However upon exporting the data the data is not being kept in the order i specified when sorting my table: This is defined as…
Ingram
  • 654
  • 2
  • 7
  • 29
0
votes
1 answer

NullPointerException on writing excel file with apache poi

I am trying to load an excel file (xls) from template, set one cell's value and write it to another file. But i get this exception: java.lang.NullPointerException at…
dermoritz
  • 12,519
  • 25
  • 97
  • 185