Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Other JSE/JEE APIs and the fly likes Problem in creating Workbook with .xlsx file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Problem in creating Workbook with .xlsx file" Watch "Problem in creating Workbook with .xlsx file" New topic
Author

Problem in creating Workbook with .xlsx file

mamata surapaneni
Greenhorn

Joined: Jul 24, 2007
Posts: 10
I am using the code

file = new File(fileName);
workbook = Workbook.getWorkbook(file);
Sheet sheet = workbook.getSheet(0);

The code is working fine for .xls (Excel 2003) and not working for .xlsx ( Excel2007). Is that anythin extra need for .xlsx files.Please help me.

Thanks,
Mamata
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30068
    
149

Mamata,
The HSSF website clearly states that the library "does not support the new Excel 2007 .xlsx OOXML file format, which is not OLE2 based." Meaning you shouldn't expect it to work.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in creating Workbook with .xlsx file
 
Similar Threads
POI 3.6: problem creating XSLX file
POI 3.6 XSSF
Created Excel file is missing something
importing data from database to excel sheet through JExcel Api
Creating Workbook with .xlsx file