Closed sebastian2010 closed 1 year ago
When adding leader_lines than there is a left angle bracket too much in showLeaderLines tag which leads to a corrupted Excel file <<c15:showLeaderLines val="1"/>
<<c15:showLeaderLines val="1"/>
Valid Excel when using leader_lines
import xlsxwriter workbook = xlsxwriter.Workbook("chart.xlsx") worksheet = workbook.add_worksheet() chart = workbook.add_chart({"type": "column"}) data = [[1, 2, 3, 4, 5]] worksheet.write_column("A1", data[0]) chart.add_series( { "values": "=Sheet1!$A$1:$A$5", "data_labels": { "value": True, "position": "outside_end", "leader_lines": True, "font": {"name": "Arial", "size": 8}, }, } ) worksheet.insert_chart("A7", chart) workbook.close()
- XlsxWriter version: 3.1.8
No response
I've added fixes to the Python and Rust test suites so that this (human) error shouldn't happen again. Thanks for the input.
Current behavior
When adding leader_lines than there is a left angle bracket too much in showLeaderLines tag which leads to a corrupted Excel file
<<c15:showLeaderLines val="1"/>
Expected behavior
Valid Excel when using leader_lines
Sample code to reproduce
Environment
Any other information
No response
OpenOffice and LibreOffice users