You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Michael Jiang <it...@gmail.com> on 2011/07/10 00:41:16 UTC

some content is unreadable (XSSF work book)

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

Re: some content is unreadable (XSSF work book)

Posted by Michael Jiang <it...@gmail.com>.
Nick,

Im using 3.7. Interesting that OpenOffice has much less restriction on
length of worksheet name or if there is restriction at all :)


On Sun, Jul 10, 2011 at 5:30 AM, Nick Burch <ni...@alfresco.com> wrote:

> On Sat, 9 Jul 2011, Michael Jiang wrote:
>
>> 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.
>>
>
> What version of POI are you running? We had to make a change recently
> because after several versions of Excel getting more relaxed over this,
> Microsoft have started tightening it up again
>
> Nick
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.**org<us...@poi.apache.org>
> For additional commands, e-mail: user-help@poi.apache.org
>
>

Re: some content is unreadable (XSSF work book)

Posted by Nick Burch <ni...@alfresco.com>.
On Sat, 9 Jul 2011, Michael Jiang wrote:
> 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.

What version of POI are you running? We had to make a change recently 
because after several versions of Excel getting more relaxed over this, 
Microsoft have started tightening it up again

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: some content is unreadable (XSSF work book)

Posted by Michael Jiang <it...@gmail.com>.
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 <it...@gmail.com> 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
>