Procházet zdrojové kódy

fix bug when parsing spreadsheets with text box

Shawn Smith před 11 roky
rodič
revize
3ee2d0195e
1 změnil soubory, kde provedl 3 přidání a 1 odebrání
  1. 3 1
      lib.go

+ 3 - 1
lib.go

@@ -553,7 +553,9 @@ func readRowsFromSheet(Worksheet *xlsxWorksheet, file *File) ([]*Row, int, int)
 			row.Cells[cellX].date1904 = file.Date1904
 			row.Cells[cellX].date1904 = file.Date1904
 			insertColIndex++
 			insertColIndex++
 		}
 		}
-		rows[insertRowIndex-minRow] = row
+		if len(rows) > insertRowIndex-minRow {
+			rows[insertRowIndex-minRow] = row
+		}
 		insertRowIndex++
 		insertRowIndex++
 	}
 	}
 	return rows, colCount, rowCount
 	return rows, colCount, rowCount