https://bz.apache.org/bugzilla/show_bug.cgi?id=58146

            Bug ID: 58146
           Summary: Unable to simply create Theme in new XSSFWorkbook
           Product: POI
           Version: 3.12-FINAL
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
          Assignee: dev@poi.apache.org
          Reporter: markiewicz.pi...@tlen.pl

Is it is possible to create empty Theme if I create XSSFWorkbook by constructor
XSSFWorkbook()?
I tried to do this, but there is a lot of fields (like Relations) to fill when
I create Theme - and finally I have to do something like reading inputStream.
But I don’t have IS, because I want create new workbook and fill everything
using data from external JSON file.
I checked that constructor XSSFWorkbook() creates objects like StylesSource and
SharedStringsTable, but not ThemesTable. So maybe it’ impossible to change
Theme after constructor, because in fact it changes nothing?
Creating Theme is so complicated (or maybe impossible now), so I tried to do
this in some other ways too:
1) I tried to: import empty XLSX file to ApachePOI, get Theme from it and set
this Theme to my new XSSFWorkbook. But then my new XLSX file doesn’t have file
/xl/theme/theme1.xml and informations: <Override
ContentType="application/vnd.openxmlformats-officedocument.theme+xml"
PartName="/xl/theme/theme1.xml" /> in content_types.xml, <Override
ContentType="application/vnd.openxmlformats-officedocument.theme+xml"
PartName="/xl/theme/theme1.xml" /> in /xl/_rels/workbook.xml.rels.
2) Then I tried to not create new XSSFWorkbook, but: import external XLSX file,
change its Theme and save again as XLSX. Then file has informations about
Theme, but about original - not changed.

-- 
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