提交 a16d2ec8 编写于 作者: xurime's avatar xurime

Change complete rows logic to fix call `SetCellValue`makes file corruption in some case.

上级 b84bfa7e
......@@ -138,8 +138,12 @@ func completeCol(xlsx xlsxWorksheet, row int, cell int) xlsxWorksheet {
// Completion row element tags of XML in a sheet.
func completeRow(xlsx xlsxWorksheet, row int, cell int) xlsxWorksheet {
if len(xlsx.SheetData.Row) >= row {
row = len(xlsx.SheetData.Row)
currentRows := len(xlsx.SheetData.Row)
if currentRows > 1 {
lastRow := xlsx.SheetData.Row[currentRows-1].R
if lastRow >= row {
row = lastRow
}
}
sheetData := xlsxSheetData{}
existsRows := map[int]int{}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册