Closed li-zheng-hao closed 11 months ago
I believe this is a bug of MiniExcel
This is the workbook.xml.rels in the original Excel file.
<?xml version="1.0" encoding="utf-8"?>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
<Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="/xl/worksheets/sheet1.xml" Id="R9565601aa86e4230840e173f558e9418"/>
<Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="/xl/styles.xml" Id="R3db9602ace774fdb"/>
</Relationships>
And this is the fixed version of workbook.xml.rels by Microsoft Excel after resaving this file
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
<Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/>
<Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" Target="theme/theme1.xml"/>
<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/>
<Relationship Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml"/>
</Relationships>
It looks theme/theme1.xml and SharedStrings.xml are missing in this list. But they should appear here. And NPOI has the logic that if there is no SharedStrings.xml in workbook.xml.rels, it will create one. You can find the code here.
And I do notice that sharedStrings.xml is empty. I believe it's a kind of performance optimization in MiniExcel while generating the Excel file.
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="0" uniqueCount="0"/>
You should talk to the MiniExcel team.
NPOI Version
2.6.2
File Type
Upload the Excel File
sample.xlsx
Reproduce Steps
Issue Description
this xlsx file is generated by MiniExcel lib, and it can open by MS Office ,but it cannot open by npoi