Przeglądaj źródła

Fixes #101 without breaking the tests.

Shawn Milochik 10 lat temu
rodzic
commit
4b3c9ed33d
1 zmienionych plików z 3 dodań i 2 usunięć
  1. 3 2
      cell.go

+ 3 - 2
cell.go

@@ -193,10 +193,11 @@ func (c *Cell) formatToInt(format string) string {
 
 // Return the formatted version of the value.
 func (c *Cell) FormattedValue() string {
-	if c.Type() == CellTypeString {
+	var numberFormat string = c.GetNumberFormat()
+	isText := numberFormat == "general" && numberFormat == "@"
+	if c.Type() == CellTypeString && isText {
 		return c.Value
 	}
-	var numberFormat string = c.GetNumberFormat()
 	switch numberFormat {
 	case "general":
 		return c.Value