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

Fix checkRow() out of range

上级 192af02a
......@@ -42,7 +42,6 @@ func SetCellInt(file []FileList, sheet string, axis string, value int) []FileLis
cell := yAxis + 1
xlsx = checkRow(xlsx)
xlsx = completeRow(xlsx, rows, cell)
xlsx = completeCol(xlsx, rows, cell)
......@@ -173,6 +172,9 @@ func replaceWorkSheetsRelationshipsNameSpace(workbookMarshal string) string {
func checkRow(xlsx xlsxWorksheet) xlsxWorksheet {
for k, v := range xlsx.SheetData.Row {
lenCol := len(v.C)
if lenCol < 1 {
continue
}
endR := getColIndex(v.C[lenCol-1].R)
endRow := getRowIndex(v.C[lenCol-1].R)
endCol := titleToNumber(endR)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册