Explorar el Código

* lib.go: Actually tell me what the bad reference was in an excel cell.

Geoffrey J. Teale hace 14 años
padre
commit
72cc390ef2
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      lib.go

+ 2 - 1
lib.go

@@ -2,6 +2,7 @@ package xlsx
 
 import (
 	"archive/zip"
+	"fmt"
 	"io"
 	"os"
 	"strconv"
@@ -70,7 +71,7 @@ func readRowsFromSheet(worksheet *XLSXWorksheet, reftable []string) []*Row {
 			cell := new(Cell)
 			ref, error := strconv.Atoi(rawcell.V.Data)
 			if error != nil {
-				panic("Invalid reference in Excel Cell (not found in sharedStrings.xml")
+				panic(fmt.Sprintf("Invalid reference in Excel Cell (not found in sharedStrings.xml) - the reference was %v\n", rawcell.V.Data))
 			}
 			cell.data = reftable[ref]
 			row.Cells[j] = cell