소스 검색

Merge branch 'master' of https://github.com/shawnps/xlsx into shawnps-master

Geoffrey J. Teale 11 년 전
부모
커밋
9c009852e7
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      lib.go

+ 3 - 1
lib.go

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