Closed kennethsantos27 closed 1 month ago
Thanks for the detailed report. I'll look into it.
The syntax of the example code doesn't look correct. Should this be a bug report against xlsxwriter.rs
and not rust_xlsxwriter.rs
?
Also, for what it is worth (since I wrote the C libxlsxwriter library that xlsxwriter.rs
uses and any bug there would probably come back to me) the output xml looks correct. Here is the same section from a file created in Excel:
<sheets>
<sheet name="SheetA" sheetId="1" r:id="rId1"/>
<sheet name="SheetB" sheetId="2" r:id="rId2"/>
<sheet name="SheetC" sheetId="3" r:id="rId3"/>
</sheets>
<definedNames>
<definedName name="_xlnm.Print_Area" localSheetId="0">SheetA!$1:$2</definedName>
<definedName name="_xlnm.Print_Area" localSheetId="1">SheetB!$1:$2</definedName>
<definedName name="_xlnm.Print_Area" localSheetId="2">SheetC!$1:$2</definedName>
</definedNames>
Thank you for the feedback, @jmcnamara
I apologize for any confusion. It appears that this issue may indeed be more relevant to the xlsxwriter.rs
crate. I will close this issue here and report it to the appropriate repository if necessary.
For additional context, we were seeing issues with print titles not being set correctly when opened in Excel, despite being correctly defined in the XML output.
We will double-check our integration with the xlsxwriter.rs
crate to ensure that the localSheetId
and other attributes are aligned correctly.
Thank you for your assistance.
If you like you can attach a problematic xlsx file here and I can take a look.
Current behavior
Current Behavior:
localSheetId
values are off by 1 compared to thesheetId
, leading to incorrect sheet references in the defined names.Expected behavior
Expected Behavior:
localSheetId
should be zero-based and correctly correspond to thesheetId
minus one from the<sheets>
section.set_repeat_rows
should be correctly reflected in the opened file.Sample code to reproduce
Any other information
Here is an example of the problematic XML output: