فهرست منبع

Fix index error when no column is defined that overlaps the cell definition.

Geoffrey J. Teale 11 سال پیش
والد
کامیت
1a95adccc5
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      lib.go

+ 1 - 1
lib.go

@@ -409,7 +409,7 @@ func readRowsFromSheet(Worksheet *xlsxWorksheet, file *File) ([]*Row, []*Col, in
 				row.Cells[cellX].numFmt = file.styles.getNumberFormat(rawcell.S, file.numFmtRefTable)
 			}
 			row.Cells[cellX].date1904 = file.Date1904
-			row.Cells[cellX].Hidden = rawrow.Hidden || cols[cellX].Hidden
+			row.Cells[cellX].Hidden = rawrow.Hidden || (len(cols) > cellX && cols[cellX].Hidden)
 			insertColIndex++
 		}
 		if len(rows) > insertRowIndex-minRow {