Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Apache POI HSSF

 
jasdeep parmar
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to write some data to Excel worksheet using Apache POI HSSF
I am doing whole lot of to formatting this data before writing. The excel sheet gets generated and opens up fine if the number of rows are less than 400 but if it exceeds more that that i get "Too many different cell formats" error while opening it and removes all the formatting in rest of the rows. Does anybody know what could be causing that. The same formatting works up un till count of rows less than 400.
I am using poi-3.1-FINAL-20080629.jar which is there in original software won't let me use newer version.

Please help...
thanks
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like a difficult problem. I don't know POI but have a couple of suggestions:

1.) Can you merge sheets of <400 together? E.g. create sub sheets and merge afterward avoiding the >400 error.

2.) Does putting in a newer version fix the problem? I know you're not allowed to but if the newer version fixes it, then you can look at the source code and patch your version with the fix.

Hope that helps a little
 
jasdeep parmar
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply...

I wasn't able to apply the newer version. I still am not sure how to fix it and I did find out that if i open the file in Excel 2007 it opens fine. I'm doing lot for formatting but its not like every cell in those 400 rows has different formatting so I still dont understand the root cause in code.

we did found a work around (run files for smaller data set :-) )
I just wanted to thank you for your time..
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No worries and I'm glad you found a workaround!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic