Questions tagged [poi-hssf]

HSSF is the Apache POI project's Java API for manipulating Excel format files (.xls and .xlsx)

The POI-HSSF tag is used for Apache POI Project's Java API for manipulating Excel format files (.xls and .xlsx).

HSSF is the POI Project's pure Java implementation of the Excel '97(-2007) file format. XSSF is the POI Project's pure Java implementation of the Excel 2007 OOXML (.xlsx) file format.

This tag should be used for questions around using and extending Apache POI HSSF.

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

165 questions
1
vote
1 answer

populating a field in excel using java HSSF POI - excel does not sort date field properly

So I am populating an excel document using Java's HSSF POI and I am using a excel template which has some headers already entered into it like so... HSSFWorkbook workbook = readFile(TEMPLATE_LOCATION); And my issue is that when I populate one of…
Hoyt
  • 11
  • 2
1
vote
0 answers

POI HSSF not iterating full set of rows

Cannot iterate the full extent of rows in my XLS spreadsheet. The code {sheet.getPhysicalNumberOfRows} returns 33492 without raising exception, but there are about 43,000 rows??. If I supply the right number manually the loop executes without…
Geoff
  • 683
  • 3
  • 9
  • 16
1
vote
1 answer

Get text and background color of a cell in .xls sheet as hex in java

I need to validate that the hex color of the text of the cell Discount is #FF1493 and the hex color of the background of the same cell is #FFC0CB. I'm getting the rgb color of the background but I could not convert it into hex and I'm not able to…
Mr Cas
  • 628
  • 1
  • 6
  • 12
1
vote
0 answers

XLS throwing java.lang.ClassNotFoundException: org.apache.poi.hssf.util.HSSFColor$BLACK

I'm having problems trying to open an XLS file with Apache POI. I am integrating HSSF in rails application. My code is like: require "rjb" Rjb::add_jar(File.expand_path('demo/poi-3.9/poi-3.9-20121203.jar')) …
Rahul2692
  • 334
  • 1
  • 10
1
vote
1 answer

Copying a single HSSFCellStyle to many cells of HSSFWorkbook

I want to create one HSSFCellSyle and copy it to the cells whose text satisfies some particular conditions. Currently,I am using a method to create new HSSFCellSyle everytime a cell satisfy conditions,though the styling parameters are the…
1
vote
0 answers

How to add sheet from one workbook to other workbook using Apache POI

I am working on a requirement where i have 2 excel, each excel has 1 sheet. and I have to create an other excel which should have both sheets of my input excel using Apache POI.
umar faraz
  • 371
  • 5
  • 18
1
vote
0 answers

How to print multiple header while downloading the excel using HSSF

I'm using HSSFRow to develop download excel functionality, by using multiple list, multiple data are writing in excel but multiple header are not coming in generated excel, I'm stuck in this kindly help on this, and let me know if you need other…
1
vote
0 answers

XSSF Drop Down List Not Supporting MSExcell and Kingsoft Spreadsheet

XSSFDataValidationHelper validationHelper = new XSSFDataValidationHelper(firstSheet); CellRangeAddressList addressList = new CellRangeAddressList(1, 1, 4, 4); XSSFDataValidationConstraint dvConstraint = (XSSFDataValidationConstraint)…
Ramesh Kumar
  • 47
  • 2
  • 10
1
vote
1 answer

XSSF Apache POI XSSFCellStyle

Rotating column heading using HSSFCellStyle using method setRotation working fine as below program --- public static void main(String[] args)throws Exception { HSSFWorkbook workbook = new HSSFWorkbook(); HSSFSheet spreadsheet =…
Basavaraj
  • 1,081
  • 1
  • 11
  • 21
1
vote
1 answer

Java Check if the Text in a Cell is Bolded Using Apache POI HSSF

Using Java and Hssf to get Excel data, how to check if a cell is bolded? I am iterating through all sheets, all rows, and all cells of an Excel workbook. I want to perform an action if the cell is bolded. //Iterate through excel sheets for (int…
pseudorandom
  • 267
  • 5
  • 20
1
vote
2 answers

HSSF cell style applied only after clicking it in Excel

As article states - created style applies only after i open created *.xls file and double click formatted cell. public HSSFWorkbook makeWorkbookExc(List allValues, List captions, Integer[] order, List
mAtsea
  • 47
  • 5
1
vote
0 answers

Passing multiple model in ModelAndView and Iterating those models

I have a requirement where I have to write HSSfWorkbook with multiple HSSfSheets. For first sheet I have different columns and second sheet has different set of columns. For each sheet I have different stored procedure written. Currently my java…
MSV
  • 155
  • 2
  • 16
1
vote
1 answer

POI Excel HSSFPicture Image and ALT TEXT

I am using POI Excel HSSFPicture to create an image and add it to my excel file. I would like to add ALT TEXT to my image but I cannot find a way to add description to my image. Is there a way to add ALT TEXT to an image using POI for Excel?
Chima
  • 11
  • 1
1
vote
3 answers

ExcelReader workbook.setMissingCellPolicy(Row.CREATE_NULL_AS_BLANK) is not working

I am trying to read excel file(xls) file using apache poi. In that, during read row if a cell is missing (cellIterator) is skipping that cell and putting the next value to different header. A B C 1 2 3 4 blank 6 In above case it is putting 6…
Rishabh Pandey
  • 49
  • 2
  • 11
1
vote
1 answer

Apache POI data format

I am using Apache POI to build some excel files and I want to make sure some of the cells are of type "Number". I tried the followings: style.setDataFormat(HSSFDataFormat.getBuiltinFormat("0")); cell.setCellValue(Integer.valueOf(value)); …
xcoder
  • 1,336
  • 2
  • 17
  • 44