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

How to export content (which is inside a one
) into excel by JSP
I have developed a web application using JSP which creates a page with several page elements and a with multiple records. I wanted to export the content in that into an excel file. I used the code…
direndd
  • 642
  • 2
  • 16
  • 47
0
votes
1 answer

How to apply border to a comple hssfsheet in java

i am using apache poi library to create a workbook, in the sheet i want to add border to my whole content table , there is option available to create border for a single cell, is there any way so that i can apply the border to whole sheet content
dhantej
  • 21
  • 1
  • 5
0
votes
1 answer

JXL + POI : incompatibility

Im first using JXL to modify one xls file created by POI. After that I will try to read that file with POI. In the moment of POIFSFileSystem creation poFileSystem = new POIFSFileSystem(input); Im getting the exception java.io.IOException: block[…
gospodin
  • 1,133
  • 4
  • 22
  • 42
0
votes
2 answers

delete all empty rows in excel file with JAVA

can someone tell me how to iterate and delete all the empty rows in excel file using apache poi? I am calling those 2 functions with row indexes that i wish to delete, but the second one (shift) is always giving me Minumum row index is 0 exceltion. …
gospodin
  • 1,133
  • 4
  • 22
  • 42
0
votes
1 answer

How to set integer value in the excel sheet created through java?

When I create excel sheet through java ,the column which has number datatype in the oracle table, get converted to text format in excel.I want it to remain in the number format.Below is my code snippet for excel creation. public boolean…
Edward
  • 1,367
  • 8
  • 26
  • 43
0
votes
1 answer

why i can not open an Excel(xls) with HSSF

Im getting an error when i am trying to open an Excel sheet with MS office 2003. This excel sheet is created using HSSFWorkbook immplementing the usermodel scope org.apache.poi.hssf.usermodel What are the differences between usermodel and event…
0
votes
1 answer

Apache POI: Storing key and sum in a Map

I'm have an excel spreadsheet that looks something like this: +-----------------+--------+----------------------+ | Title | Value | Average Price List | +-----------------+--------+----------------------+ | | | …
lv10
  • 1,469
  • 7
  • 25
  • 46
-1
votes
1 answer

How to Validate the String and it's Value in excel through Java?

Am new to Java and I have challenge in validating the excel file.Please help me. I want to validate that 'Hyderabad' is the location Name and '1' is the location ID from excel(pls screenshot below)through JAVA .Am able to read all the cell…
Rahul
  • 759
  • 3
  • 21
  • 43
-1
votes
2 answers

How to set cell value?

I have got the following code: HSSFSheet sheet = workbook.getSheetAt(0); Cell resultCell=(Cell) sheet.getRow(1).getCell(0); Problem is result cell doesn't have any method setCellValue(). Following statement gives me an error …
puffles
  • 352
  • 2
  • 5
  • 23
-1
votes
1 answer

Create custom Excel sheet

I am trying to generate an Excel sheet populating the data dynamically using Apache POI. I have to populate a list i. Each object of i contains four string variables and one list j. Each object of list j contains three string variables. j.size()…
-1
votes
1 answer

How to read from formatted cells in Excel where numbers are stored as texts in Java using Apache POI

I need to read from formatted cells in Excel where numbers are stored as text in Java using Apache POI and extract the cells' contents as strings in their original format.
Saber
  • 167
  • 1
  • 2
  • 6
-1
votes
1 answer

HSSFSheet remove all empty rows

I have an excel sheet with, for exemple 3,4 adn 6th line that are empty (previously I called sheet.removeRow() for those rows). In total i have 7 lines Now, having indexes of those empty rows, i want to remove them (shift them). When I call the…
gospodin
  • 1,133
  • 4
  • 22
  • 42
-1
votes
3 answers

Null Pointer Exception

I am getting a null pointer exception, but I dont know why. I checked to see if the cell was null before I read it to a string. So, why is that string null? private void fillArray() { try { readBook = new…
-1
votes
1 answer

Removal of decimal in HSSF cell

i am reading data from an excel sheet which has decimals. i want to obtain the result without decimals. I'm using cell.getNumericCellValue () which gives decimal - is there a function which removes decimals.
sweety
  • 73
  • 2
  • 5
  • 15
-6
votes
1 answer

In Java ,how to use org.apache.poi.hssf and get the value of two columns alone with the column name from the excel sheet that is uploaded

Hi I am trying to get the values of two columns with the column name. I have uploaded an excel sheet and I have to fetch the values of this two columns and then save it in DB. Can someone help me with this
Janani sridhar
  • 23
  • 3
  • 10
1 2 3
10
11