Open tobwen opened 4 years ago
Currently, numerical values cannot be stored in columns. The reason is that numbers incorrectly end up in "shared strings" and their indexes are ending up in the cell - not the values itself.
change this https://github.com/kasparsd/mini-sheets-php/blob/16e283906e7d38184025e88f1b42d6b7d7433baa/src/XlsxBuilder.php#L78-L83
into that
$cells[] = sprintf( '<c r="%s" t="%s"><v>%s</v></c>', $this->escape_xml( $this->xlsx_cell_name( $row_no, $col_no ) ), $this->escape_xml( $field_type ), $this->escape_xml( $field_type === 'n' ? $field_value : $field_value_no ) );
Put the creation of $field_value_no into an else clause.
$field_value_no
else
I have same problem. Number are shown as 0 in cells. Will this fix be approved?
What's the issue?
Currently, numerical values cannot be stored in columns. The reason is that numbers incorrectly end up in "shared strings" and their indexes are ending up in the cell - not the values itself.
Want a quick fix?
change this https://github.com/kasparsd/mini-sheets-php/blob/16e283906e7d38184025e88f1b42d6b7d7433baa/src/XlsxBuilder.php#L78-L83
into that
Make it even better
Put the creation of
$field_value_no
into anelse
clause.