mirror of
https://gitee.com/dotnetchina/MiniExcel.git
synced 2024-11-29 18:38:08 +08:00
Bug: fix sharedStrings ref #549
This commit is contained in:
parent
f6992131ec
commit
b7bc3cce57
BIN
samples/xlsx/TestIssue549.xlsx
Normal file
BIN
samples/xlsx/TestIssue549.xlsx
Normal file
Binary file not shown.
25
samples/xlsx/TestIssue549/[Content_Types].xml
Normal file
25
samples/xlsx/TestIssue549/[Content_Types].xml
Normal file
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
|
||||
<Default
|
||||
ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings"
|
||||
Extension="bin" />
|
||||
<Default ContentType="application/xml" Extension="xml" />
|
||||
<Default ContentType="image/jpeg" Extension="jpg" />
|
||||
<Default ContentType="image/png" Extension="png" />
|
||||
<Default ContentType="image/gif" Extension="gif" />
|
||||
<Default ContentType="application/vnd.openxmlformats-package.relationships+xml" Extension="rels" />
|
||||
<Override ContentType="application/vnd.openxmlformats-package.relationships+xml"
|
||||
PartName="/_rels/.rels" />
|
||||
<Override ContentType="application/vnd.openxmlformats-package.relationships+xml"
|
||||
PartName="/xl/sharedStrings.xml" />
|
||||
<Override
|
||||
ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"
|
||||
PartName="/xl/worksheets/sheet1.xml" />
|
||||
<Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"
|
||||
PartName="/xl/styles.xml" />
|
||||
<Override ContentType="application/vnd.openxmlformats-officedocument.drawing+xml"
|
||||
PartName="/xl/drawings/drawing1.xml" />
|
||||
<Override
|
||||
ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"
|
||||
PartName="/xl/workbook.xml" />
|
||||
</Types>
|
1
samples/xlsx/TestIssue549/[Content_Types].xml.bak
Normal file
1
samples/xlsx/TestIssue549/[Content_Types].xml.bak
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings" Extension="bin"/><Default ContentType="application/xml" Extension="xml"/><Default ContentType="image/jpeg" Extension="jpg"/><Default ContentType="image/png" Extension="png"/><Default ContentType="image/gif" Extension="gif"/><Default ContentType="application/vnd.openxmlformats-package.relationships+xml" Extension="rels"/><Override ContentType="application/vnd.openxmlformats-package.relationships+xml" PartName="/_rels/.rels" /><Override ContentType="application/vnd.openxmlformats-package.relationships+xml" PartName="/xl/sharedStrings.xml" /><Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" PartName="/xl/worksheets/sheet1.xml" /><Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml" PartName="/xl/styles.xml" /><Override ContentType="application/vnd.openxmlformats-officedocument.drawing+xml" PartName="/xl/drawings/drawing1.xml" /><Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" PartName="/xl/workbook.xml" /></Types>
|
1
samples/xlsx/TestIssue549/_rels/.rels
Normal file
1
samples/xlsx/TestIssue549/_rels/.rels
Normal file
@ -0,0 +1 @@
|
||||
<?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/officeDocument" Target="xl/workbook.xml" Id="Rfc2254092b6248a9" /></Relationships>
|
2
samples/xlsx/TestIssue549/xl/_rels/workbook.xml.rels
Normal file
2
samples/xlsx/TestIssue549/xl/_rels/workbook.xml.rels
Normal file
@ -0,0 +1,2 @@
|
||||
<?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="R4403b806f3d24d22a79b467da74b0a9e" />
|
||||
<Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="/xl/styles.xml" Id="R3db9602ace774fdb" /></Relationships>
|
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
|
||||
|
||||
</Relationships>
|
1
samples/xlsx/TestIssue549/xl/drawings/drawing1.xml
Normal file
1
samples/xlsx/TestIssue549/xl/drawings/drawing1.xml
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><xdr:wsDr xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:xdr="http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing"> </xdr:wsDr>
|
1
samples/xlsx/TestIssue549/xl/sharedStrings.xml
Normal file
1
samples/xlsx/TestIssue549/xl/sharedStrings.xml
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="0" uniqueCount="0"></sst>
|
1
samples/xlsx/TestIssue549/xl/styles.xml
Normal file
1
samples/xlsx/TestIssue549/xl/styles.xml
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><x:styleSheet xmlns:x="http://schemas.openxmlformats.org/spreadsheetml/2006/main"> <x:numFmts count="1"> <x:numFmt numFmtId="0" formatCode="" /> </x:numFmts> <x:fonts count="2"> <x:font> <x:vertAlign val="baseline" /> <x:sz val="11" /> <x:color rgb="FF000000" /> <x:name val="Calibri" /> <x:family val="2" /> </x:font> <x:font> <x:vertAlign val="baseline" /> <x:sz val="11" /> <x:color rgb="FFFFFFFF" /> <x:name val="Calibri" /> <x:family val="2" /> </x:font> </x:fonts> <x:fills count="3"> <x:fill> <x:patternFill patternType="none" /> </x:fill> <x:fill> <x:patternFill patternType="gray125" /> </x:fill> <x:fill> <x:patternFill patternType="solid"> <x:fgColor rgb="284472C4" /> </x:patternFill> </x:fill> </x:fills> <x:borders count="2"> <x:border diagonalUp="0" diagonalDown="0"> <x:left style="none"> <x:color rgb="FF000000" /> </x:left> <x:right style="none"> <x:color rgb="FF000000" /> </x:right> <x:top style="none"> <x:color rgb="FF000000" /> </x:top> <x:bottom style="none"> <x:color rgb="FF000000" /> </x:bottom> <x:diagonal style="none"> <x:color rgb="FF000000" /> </x:diagonal> </x:border> <x:border diagonalUp="0" diagonalDown="0"> <x:left style="thin"> <x:color rgb="FF000000" /> </x:left> <x:right style="thin"> <x:color rgb="FF000000" /> </x:right> <x:top style="thin"> <x:color rgb="FF000000" /> </x:top> <x:bottom style="thin"> <x:color rgb="FF000000" /> </x:bottom> <x:diagonal style="none"> <x:color rgb="FF000000" /> </x:diagonal> </x:border> </x:borders> <x:cellStyleXfs count="3"> <x:xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyNumberFormat="1" applyFill="1" applyBorder="0" applyAlignment="1" applyProtection="1"> <x:protection locked="1" hidden="0" /> </x:xf> <x:xf numFmtId="14" fontId="1" fillId="2" borderId="1" applyNumberFormat="1" applyFill="0" applyBorder="1" applyAlignment="1" applyProtection="1"> <x:protection locked="1" hidden="0" /> </x:xf> <x:xf numFmtId="0" fontId="0" fillId="0" borderId="1" applyNumberFormat="1" applyFill="1" applyBorder="1" applyAlignment="1" applyProtection="1"> <x:protection locked="1" hidden="0" /> </x:xf> </x:cellStyleXfs> <x:cellXfs count="4"> <x:xf></x:xf> <x:xf numFmtId="0" fontId="1" fillId="2" borderId="1" xfId="0" applyNumberFormat="1" applyFill="0" applyBorder="1" applyAlignment="1" applyProtection="1"> <x:alignment horizontal="left" vertical="bottom" textRotation="0" wrapText="0" indent="0" relativeIndent="0" justifyLastLine="0" shrinkToFit="0" readingOrder="0" /> <x:protection locked="1" hidden="0" /> </x:xf> <x:xf numFmtId="0" fontId="0" fillId="0" borderId="1" xfId="0" applyNumberFormat="1" applyFill="1" applyBorder="1" applyAlignment="1" applyProtection="1"> <x:alignment horizontal="general" vertical="bottom" textRotation="0" wrapText="0" indent="0" relativeIndent="0" justifyLastLine="0" shrinkToFit="0" readingOrder="0" /> <x:protection locked="1" hidden="0" /> </x:xf> <x:xf numFmtId="14" fontId="0" fillId="0" borderId="1" xfId="0" applyNumberFormat="1" applyFill="1" applyBorder="1" applyAlignment="1" applyProtection="1"> <x:alignment horizontal="general" vertical="bottom" textRotation="0" wrapText="0" indent="0" relativeIndent="0" justifyLastLine="0" shrinkToFit="0" readingOrder="0" /> <x:protection locked="1" hidden="0" /> </x:xf> <x:xf numFmtId="0" fontId="0" fillId="0" borderId="1" xfId="0" applyBorder="1" applyAlignment="1"> <x:alignment horizontal="fill"/> </x:xf> </x:cellXfs> <x:cellStyles count="1"> <x:cellStyle name="Normal" xfId="0" builtinId="0" /> </x:cellStyles></x:styleSheet>
|
2
samples/xlsx/TestIssue549/xl/workbook.xml
Normal file
2
samples/xlsx/TestIssue549/xl/workbook.xml
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><x:workbook xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:x="http://schemas.openxmlformats.org/spreadsheetml/2006/main"> <x:sheets> <x:sheet name="Sheet1" sheetId="1" r:id="R4403b806f3d24d22a79b467da74b0a9e" />
|
||||
</x:sheets></x:workbook>
|
@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"> <Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing" Target="../drawings/drawing1.xml" Id="drawing1" /></Relationships>
|
1
samples/xlsx/TestIssue549/xl/worksheets/sheet1.xml
Normal file
1
samples/xlsx/TestIssue549/xl/worksheets/sheet1.xml
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><x:worksheet xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:x="http://schemas.openxmlformats.org/spreadsheetml/2006/main" ><x:dimension ref="A1:B3"/><x:sheetData><x:row r="1"><x:c r="A1" t="str" s="1"><x:v>id</x:v></x:c><x:c r="B1" t="str" s="1"><x:v>name</x:v></x:c></x:row><x:row r="2"><x:c r="A2" t ="n" s="2"><x:v>1</x:v></x:c><x:c r="B2" t ="str" s="2"><x:v>jack</x:v></x:c></x:row><x:row r="3"><x:c r="A3" t ="n" s="2"><x:v>2</x:v></x:c><x:c r="B3" t ="str" s="2"><x:v>mike</x:v></x:c></x:row></x:sheetData><x:autoFilter ref="A1:B3" /><x:drawing r:id="drawing1" /></x:worksheet>
|
BIN
samples/xlsx/TestIssue549_Office365.xlsx
Normal file
BIN
samples/xlsx/TestIssue549_Office365.xlsx
Normal file
Binary file not shown.
19
samples/xlsx/TestIssue549_Office365/[Content_Types].xml
Normal file
19
samples/xlsx/TestIssue549_Office365/[Content_Types].xml
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
|
||||
<Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml" />
|
||||
<Default Extension="xml" ContentType="application/xml" />
|
||||
<Override PartName="/xl/workbook.xml"
|
||||
ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" />
|
||||
<Override PartName="/xl/worksheets/sheet1.xml"
|
||||
ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" />
|
||||
<Override PartName="/xl/theme/theme1.xml"
|
||||
ContentType="application/vnd.openxmlformats-officedocument.theme+xml" />
|
||||
<Override PartName="/xl/styles.xml"
|
||||
ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml" />
|
||||
<Override PartName="/xl/sharedStrings.xml"
|
||||
ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml" />
|
||||
<Override PartName="/docProps/core.xml"
|
||||
ContentType="application/vnd.openxmlformats-package.core-properties+xml" />
|
||||
<Override PartName="/docProps/app.xml"
|
||||
ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml" />
|
||||
</Types>
|
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/><Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/><Override PartName="/xl/theme/theme1.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml"/><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/><Override PartName="/xl/sharedStrings.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"/><Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/><Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/></Types>
|
2
samples/xlsx/TestIssue549_Office365/_rels/.rels
Normal file
2
samples/xlsx/TestIssue549_Office365/_rels/.rels
Normal file
@ -0,0 +1,2 @@
|
||||
<?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/extended-properties" Target="docProps/app.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>
|
2
samples/xlsx/TestIssue549_Office365/docProps/app.xml
Normal file
2
samples/xlsx/TestIssue549_Office365/docProps/app.xml
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"><Application>Microsoft Excel</Application><DocSecurity>0</DocSecurity><ScaleCrop>false</ScaleCrop><HeadingPairs><vt:vector size="2" baseType="variant"><vt:variant><vt:lpstr>Worksheets</vt:lpstr></vt:variant><vt:variant><vt:i4>1</vt:i4></vt:variant></vt:vector></HeadingPairs><TitlesOfParts><vt:vector size="1" baseType="lpstr"><vt:lpstr>Sheet1</vt:lpstr></vt:vector></TitlesOfParts><LinksUpToDate>false</LinksUpToDate><SharedDoc>false</SharedDoc><HyperlinksChanged>false</HyperlinksChanged><AppVersion>16.0300</AppVersion></Properties>
|
2
samples/xlsx/TestIssue549_Office365/docProps/core.xml
Normal file
2
samples/xlsx/TestIssue549_Office365/docProps/core.xml
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><cp:lastModifiedBy>Lin WeiHan</cp:lastModifiedBy><dcterms:modified xsi:type="dcterms:W3CDTF">2024-05-12T08:40:01Z</dcterms:modified></cp:coreProperties>
|
@ -0,0 +1,2 @@
|
||||
<?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>
|
2
samples/xlsx/TestIssue549_Office365/xl/sharedStrings.xml
Normal file
2
samples/xlsx/TestIssue549_Office365/xl/sharedStrings.xml
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="4" uniqueCount="4"><si><t>id</t></si><si><t>name</t></si><si><t>jack</t></si><si><t>mike</t></si></sst>
|
2
samples/xlsx/TestIssue549_Office365/xl/styles.xml
Normal file
2
samples/xlsx/TestIssue549_Office365/xl/styles.xml
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac x16r2 xr" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:x16r2="http://schemas.microsoft.com/office/spreadsheetml/2015/02/main" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision"><fonts count="2" x14ac:knownFonts="1"><font><sz val="11"/><color rgb="FF000000"/><name val="Calibri"/><family val="2"/></font><font><sz val="11"/><color rgb="FFFFFFFF"/><name val="Calibri"/><family val="2"/></font></fonts><fills count="3"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill><fill><patternFill patternType="solid"><fgColor rgb="FF4472C4"/></patternFill></fill></fills><borders count="2"><border><left/><right/><top/><bottom/><diagonal/></border><border><left style="thin"><color rgb="FF000000"/></left><right style="thin"><color rgb="FF000000"/></right><top style="thin"><color rgb="FF000000"/></top><bottom style="thin"><color rgb="FF000000"/></bottom><diagonal/></border></borders><cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyBorder="0"/></cellStyleXfs><cellXfs count="3"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/><xf numFmtId="0" fontId="1" fillId="2" borderId="1" xfId="0" applyFont="1" applyFill="1" applyBorder="1" applyAlignment="1"><alignment horizontal="left"/></xf><xf numFmtId="0" fontId="0" fillId="0" borderId="1" xfId="0" applyBorder="1"/></cellXfs><cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles><dxfs count="0"/><tableStyles count="0" defaultTableStyle="TableStyleMedium2" defaultPivotStyle="PivotStyleLight16"/><extLst><ext uri="{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"><x14:slicerStyles defaultSlicerStyle="SlicerStyleLight1"/></ext><ext uri="{9260A510-F301-46a8-8635-F512D64BE5F5}" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"><x15:timelineStyles defaultTimelineStyle="TimeSlicerStyleLight1"/></ext></extLst></styleSheet>
|
2
samples/xlsx/TestIssue549_Office365/xl/theme/theme1.xml
Normal file
2
samples/xlsx/TestIssue549_Office365/xl/theme/theme1.xml
Normal file
File diff suppressed because one or more lines are too long
2
samples/xlsx/TestIssue549_Office365/xl/workbook.xml
Normal file
2
samples/xlsx/TestIssue549_Office365/xl/workbook.xml
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x15 xr xr6 xr10 xr2" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision" xmlns:xr6="http://schemas.microsoft.com/office/spreadsheetml/2016/revision6" xmlns:xr10="http://schemas.microsoft.com/office/spreadsheetml/2016/revision10" xmlns:xr2="http://schemas.microsoft.com/office/spreadsheetml/2015/revision2"><fileVersion appName="xl" lastEdited="7" lowestEdited="7" rupBuild="27531"/><workbookPr defaultThemeVersion="202300"/><mc:AlternateContent xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"><mc:Choice Requires="x15"><x15ac:absPath url="D:\git\MiniExcel\samples\xlsx\" xmlns:x15ac="http://schemas.microsoft.com/office/spreadsheetml/2010/11/ac"/></mc:Choice></mc:AlternateContent><xr:revisionPtr revIDLastSave="0" documentId="13_ncr:1_{88238D1F-DE07-4C0C-8771-11881E08CEE1}" xr6:coauthVersionLast="47" xr6:coauthVersionMax="47" xr10:uidLastSave="{00000000-0000-0000-0000-000000000000}"/><bookViews><workbookView xWindow="768" yWindow="768" windowWidth="17280" windowHeight="9072" xr2:uid="{00000000-000D-0000-FFFF-FFFF00000000}"/></bookViews><sheets><sheet name="Sheet1" sheetId="1" r:id="rId1"/></sheets><calcPr calcId="0"/></workbook>
|
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac xr xr2 xr3" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision" xmlns:xr2="http://schemas.microsoft.com/office/spreadsheetml/2015/revision2" xmlns:xr3="http://schemas.microsoft.com/office/spreadsheetml/2016/revision3" xr:uid="{00000000-0001-0000-0000-000000000000}"><dimension ref="A1:B3"/><sheetViews><sheetView tabSelected="1" workbookViewId="0"><selection activeCell="F3" sqref="F3"/></sheetView></sheetViews><sheetFormatPr defaultRowHeight="14.4" x14ac:dyDescent="0.3"/><sheetData><row r="1" spans="1:2" x14ac:dyDescent="0.3"><c r="A1" s="1" t="s"><v>0</v></c><c r="B1" s="1" t="s"><v>1</v></c></row><row r="2" spans="1:2" x14ac:dyDescent="0.3"><c r="A2" s="2"><v>1</v></c><c r="B2" s="2" t="s"><v>2</v></c></row><row r="3" spans="1:2" x14ac:dyDescent="0.3"><c r="A3" s="2"><v>2</v></c><c r="B3" s="2" t="s"><v>3</v></c></row></sheetData><autoFilter ref="A1:B3" xr:uid="{00000000-0009-0000-0000-000000000000}"/><pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3"/></worksheet>
|
@ -73,7 +73,7 @@ namespace MiniExcelLibs.OpenXml
|
||||
internal async Task GenerateDefaultOpenXmlAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
await CreateZipEntryAsync("_rels/.rels", "application/vnd.openxmlformats-package.relationships+xml", ExcelOpenXmlSheetWriter._defaultRels, cancellationToken);
|
||||
await CreateZipEntryAsync("xl/sharedStrings.xml", "application/vnd.openxmlformats-package.relationships+xml", ExcelOpenXmlSheetWriter._defaultSharedString, cancellationToken);
|
||||
await CreateZipEntryAsync("xl/sharedStrings.xml", "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml", ExcelOpenXmlSheetWriter._defaultSharedString, cancellationToken);
|
||||
}
|
||||
|
||||
private async Task CreateZipEntryAsync(string path, string contentType, string content, CancellationToken cancellationToken)
|
||||
|
@ -27,6 +27,7 @@ namespace MiniExcelLibs.OpenXml
|
||||
<Relationships xmlns=""http://schemas.openxmlformats.org/package/2006/relationships"">
|
||||
{{sheets}}
|
||||
<Relationship Type=""http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles"" Target=""/xl/styles.xml"" Id=""R3db9602ace774fdb"" />
|
||||
<Relationship Type=""http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings"" Target=""/xl/sharedStrings.xml"" Id=""R3db9602ace778fdb"" />
|
||||
</Relationships>";
|
||||
|
||||
private static readonly string _noneStylesXml = @"<?xml version=""1.0"" encoding=""utf-8""?>
|
||||
@ -184,7 +185,7 @@ namespace MiniExcelLibs.OpenXml
|
||||
internal void GenerateDefaultOpenXml()
|
||||
{
|
||||
CreateZipEntry("_rels/.rels", "application/vnd.openxmlformats-package.relationships+xml", ExcelOpenXmlSheetWriter._defaultRels);
|
||||
CreateZipEntry("xl/sharedStrings.xml", "application/vnd.openxmlformats-package.relationships+xml", ExcelOpenXmlSheetWriter._defaultSharedString);
|
||||
CreateZipEntry("xl/sharedStrings.xml", "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml", ExcelOpenXmlSheetWriter._defaultSharedString);
|
||||
}
|
||||
|
||||
private void CreateZipEntry(string path, string contentType, string content)
|
||||
|
@ -5,6 +5,8 @@ using MiniExcelLibs.Exceptions;
|
||||
using MiniExcelLibs.OpenXml;
|
||||
using MiniExcelLibs.Tests.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using NPOI.SS.UserModel;
|
||||
using NPOI.XSSF.UserModel;
|
||||
using OfficeOpenXml;
|
||||
using System;
|
||||
using System.Collections;
|
||||
@ -12,6 +14,7 @@ using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Data.SQLite;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@ -33,6 +36,32 @@ namespace MiniExcelLibs.Tests
|
||||
this.output = output;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// https://github.com/mini-software/MiniExcel/issues/549
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestIssue549()
|
||||
{
|
||||
var data = new[] {
|
||||
new{id=1,name="jack"},
|
||||
new{id=2,name="mike"},
|
||||
};
|
||||
var path = Path.GetTempPath() + Guid.NewGuid() + ".xlsx";
|
||||
MiniExcel.SaveAs(path, data);
|
||||
var rows = MiniExcel.Query(path,true).ToList();
|
||||
{
|
||||
using (FileStream stream = new FileStream(path, FileMode.Open, FileAccess.Read))
|
||||
{
|
||||
XSSFWorkbook workbook = new XSSFWorkbook(stream);
|
||||
ISheet sheet = workbook.GetSheetAt(0);
|
||||
var a2 = sheet.GetRow(1).GetCell(0);
|
||||
var b2 = sheet.GetRow(1).GetCell(1);
|
||||
Assert.Equal((string)rows[0].id.ToString(), a2.NumericCellValue.ToString());
|
||||
Assert.Equal((string)rows[0].name.ToString(), b2.StringCellValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TestIssue24020201()
|
||||
{
|
||||
|
@ -23,6 +23,7 @@
|
||||
<PackageReference Include="ExcelDataReader" Version="3.6.0" />
|
||||
<PackageReference Include="ExcelDataReader.DataSet" Version="3.6.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
||||
<PackageReference Include="NPOI" Version="2.7.0" />
|
||||
<PackageReference Include="System.Data.SQLite.Core" Version="1.0.115.5" />
|
||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="5.0.0" />
|
||||
<PackageReference Include="xunit" Version="2.4.1" />
|
||||
|
Loading…
Reference in New Issue
Block a user