Find out why. It contains a worksheet that has name that is longer than 31 chars. The java doc mentioned this and said it's fine to pass a name > 31 chars and the function will silently truncate it. So, I didn't truncate the name and thought that the limitation might be relaxed in future, so better let the poi function to handle that. But now I strongly suspect that actually it turns out it does NOT silently truncate a longer name. I can open the work book in open office and it shows full name for that worksheet that passed into the function in my code. So, I guess I have to enforce that truncation of worksheet name longer than 31 chars in my code.
Hope this might help other POI users :) On Sat, Jul 9, 2011 at 3:41 PM, Michael Jiang <[email protected]> wrote: > Used XSSF to generate .xlsx workbooks. Workbooks are generated from a > servlet and downloaded from web browser on client side. Though there is a > problem with one of generated workbooks. When open it in excel 2011 , excel > prompted some issue opening the file as follows: > > *Excel could not open Export.xlsx because some content is unreadable. Do > you want to open and repair this workbook? > * > By choosing "Open and Repair", Excel prompted the following message: > > *"Excel repaired or removed unreadable content from this workbook. Do you > want to review or save the log file?"* > > By choosing "Review Log File", I got the following. It doesn't seem to tell > what really goes wrong. > > <?xml version="1.0" encoding="UTF-8" standalone="yes"?> > <recoveryLog xmlns=" > http://schemas.openxmlformats.org/spreadsheetml/2006/main"><logFileName>Repair > Result to Export-384 07093.xml</logFileName> > <summary>Errors were detected in file 'Macintosh > HD:Users:myaccount:Downloads:Export.xlsx'</summary> > <repairedRecords summary="Following is a list of repairs:"> > <repairedRecord>Repaired Records: Worksheet properties from > /xl/workbook.xml (Workbook)</repairedRecord> > </repairedRecords> > </recoveryLog> > > How to find out what this actually means? Any idea? Thanks! > > --Michael >
