Skip to content

Commit

Permalink
NA set to a number didn't work in .xls sheets
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Marshall committed Apr 10, 2015
1 parent 10d0015 commit 3e830be
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/CellType.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ inline CellType cellType(xls::st_cell::st_cell_data cell, xls::st_xf* styles,
case 6: // formula
case 1030: // formula (Apple Numbers Bug)
if (cell.l == 0) {
return CELL_NUMERIC;
return na.contains(cell.d) ? CELL_BLANK : CELL_NUMERIC;
} else {
if (na.contains((char*) cell.str)) {
return CELL_BLANK;
Expand All @@ -75,6 +75,9 @@ inline CellType cellType(xls::st_cell::st_cell_data cell, xls::st_xf* styles,
case 515: // Number
case 638: // Rk
{
if (na.contains(cell.d))
return CELL_BLANK;

if (styles == NULL)
return CELL_NUMERIC;

Expand Down

0 comments on commit 3e830be

Please sign in to comment.