https://issues.apache.org/bugzilla/show_bug.cgi?id=55292

--- Comment #12 from Darren Roberts <robertsdjguard-poi...@yahoo.com> ---
(In reply to Tim Allison from comment #11)
> Created attachment 30646 [details]
> testAddBulletParagraphs result
> 
> Excel is throwing an "unreadable content; want to recover" message when I
> try to open the wb created in testAddBulletParagraphs.  Excel is able to
> recover, but can you tell what's causing this?  To generate this attachment,
> I added the following at the end of testAddBulletParagraphs:
> 
>  try{
>   OutputStream os = new FileOutputStream(new
> File("C:/data/testbullets.xlsx"));
>   wb.write(os);
>   os.flush();
>   os.close();
>  } catch (IOException e){
>   e.printStackTrace();
>  }

Ah, I have been able to figure out what it is that Excel doesn't like - by
default in the code when you set a paragraph as a bullet using setBullet(true)
it sets a character to use as the bullet, but Excel doesn't like this being
defined if you then set the bullet to use auto-numbering. Remove the buChar
from the XML for the auto-number bullets and it loads without issue (almost,
the arbitrary size text box actually needs to be bigger).

Interestingly the spec makes no mention of the buAutoNum and buChar elements
being exclusive, so presumably it is an Excel-ism. LibreOffice Calc loads
without complaint, but doesn't appear to support bullets in the textbox (just
displays them as normal paragraphs) so that doesn't help as far as testing
goes.

So two options, I can either remove the automatic setting of the buChar (in
which case Excel does not display anything, it does not substitutes a value),
or set it and remove it if you call setBulletAutoNumbering?

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to