Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Bug report: add_table to multiple sheets #51
I'm using Python 2.7.5 and XlsxWriter 0.4.3, on Windows 8 x64 system. My MS Excel is Excel 2013.
I want to create two sheets, then add two tables to them in a reversed order (add the 1st table to sheet2, which is created later than sheet1; and then add the 2nd table to sheet1). But the output excel file will have some problem to open: "Repaired Records: Table from /xl/tables/table1.xml part (Table)", reported by Microsoft Excel.
Here is the sample code.
import xlsxwriter book = xlsxwriter.Workbook('output.xlsx') sheet1 = book.add_worksheet('Sheet1') sheet2 = book.add_worksheet('Sheet2') sheet2.add_table('A1:D10') sheet1.add_table('A1:F5') book.close()
I can fix it by calling sheet1.add_table before sheet2.add_table. But in real-life scenarios, it's very hard to do the exchange.