Hi all,
I hope I did'n miss anything about this before;

>  We're now able to open an existing ooxml excel file in poi, tweak it, save
>  it, and have it open in excel! Admitedly, excel does feel the need to
>  repair the file, and it declares any new files we create to be
>  un-repairable, but it's a start... :)

for the first time today I could create a new .xlsx file through the
POI library and open it in Excel 2007 without making the application
declaring that the file is 'un-repairable'.
Checked in TestXSSFWorkbook.testSaveNew()

We were missing some styles.xml stuff, that is required in order to
make the file properly readable by Excel 2007;  in particular, we have
to provide:
_ at least one font
_ at least one fill
_ at least one border
_ at least one cellStyle Xf
_ at least one cell Xf

Attached the default styles.xml part created for a new POI .xlsx file

Paolo





-- 
Paolo Mottadelli
Sourcesense - making sense of Open Source: http://www.sourcesense.com
<?xml version="1.0" encoding="UTF-8"?>
<styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main";>
  <numFmts count="0"/>
  <fonts count="1">
    <font>
      <sz val="11.0"/>
      <color theme="1"/>
      <name val="Calibri"/>
      <family val="2"/>
      <scheme val="minor"/>
    </font>
  </fonts>
  <fills count="1">
    <fill>
      <patternFill patternType="none"/>
    </fill>
  </fills>
  <borders count="1">
    <border>
      <left/>
      <right/>
      <top/>
      <bottom/>
      <diagonal/>
    </border>
  </borders>
  <cellStyleXfs count="1">
    <xf numFmtId="0" fontId="0" fillId="0" borderId="0"/>
  </cellStyleXfs>
  <cellXfs count="1">
    <xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/>
  </cellXfs>
</styleSheet>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to