File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes Excel document created using HSSF POI API not opening in Windows7 but opening in Win XP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Excel document created using HSSF POI API not opening in Windows7 but opening in Win XP" Watch "Excel document created using HSSF POI API not opening in Windows7 but opening in Win XP" New topic
Author

Excel document created using HSSF POI API not opening in Windows7 but opening in Win XP

NarayanaRao Konakalla
Greenhorn

Joined: Jan 29, 2008
Posts: 13
Hi

I have installed the same version of "MS Office 2007" in Windows 7 and Windows XP operating systems.
I have a Excel file generated by a non-microsoft program (a java program) with me.

HSSF POI jar version is 1.5.1 (name of jar is jakarta-poi-1.5.1-final-20020615.jar)

I tried opening the file in windows xp, using Excel 2007.. The file opened and I was able to see all the data.
But when I copied the same excel file to Windows7 OS, and tried to open with the same installation of Office 2007, I get the an alert box with following message.

"Excel found unreadable content in "xyz.xls".Do you want to recover the contents of the workbook.If you trust the source of this workbook, click Yes"..

Once I click yes, the file opens displaying a message as follows.

"Excel recovered your formulas and cell values, but some data may have been lost"...

Some data is lost when I open the same file in Windows 7 OS, Excel 2007...

Any clues about why I am losing the data in Windows 7 but the file opens correctly in WinXP..


Is there any problem with the way I created the workbook..? Please help..
Vidyanand Sharma
Greenhorn

Joined: Oct 06, 2010
Posts: 2
Hi Narayana,

Were you able to resolve this issue with HSSF POI jar version?
I am also facing the same problem and do not seem to find any workaround.

Please Let me know what did you do to overcome this.

Cheers,
Vidyanand
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41635
    
  55
The first step should be to upgrade to a recent POI version; at this point, you shouldn't be using anything older than POI 3.5.


Ping & DNS - my free Android networking tools app
Vidyanand Sharma
Greenhorn

Joined: Oct 06, 2010
Posts: 2

I did that to 3.6 but got some exception. Did not work so right now I am trying to test by recoding for XSSF format.
If you need I'll do that again and post the error that I got.


Ram Panuganti
Greenhorn

Joined: Aug 21, 2008
Posts: 4
Hi Vidyanand,

I am also facing the same issue, did you find any luck with this issue?
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Hi Ram Panuganti and welcome to Javaranch! Perhaps you can post your exact problem details?


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Ram Panuganti
Greenhorn

Joined: Aug 21, 2008
Posts: 4
We have an application using Java 1.4.2 and POI 1.5. When we create MS-Excel document using POI 1.5 we are able to open the file in Windows XP and MS-Office 2007 environment but it is showing error in Windows 7 and MS-Office 2007.

Option I am considering:
Migrate from POI 1.5 to POI 3.6 :
-------------------------------------
- In this case I need to migrate Java 1.4.2 to 1.5 or higher
- is there a POI version which works fine for my requirement without channging the Java version?

- As MS-Office version is same, why is it giving problem for Windows 7 but not in XP?

Please let me know if you guys have any solution.
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Hi Ram,

I'm not a POI user but my understanding is that yes you need to upgrade to the latest version to support the recent versions of Office, I believe that also means an upgrade of Java. I don't think there is another version of POI that will do the trick and Windows 7 Office uses different internal APIs than Windows XP Office.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Excel document created using HSSF POI API not opening in Windows7 but opening in Win XP