Skip to content

Commit 2fa4440

Browse files
committed
Get empty cells when row values are zeroes, expect number zero cells
1 parent b0df315 commit 2fa4440

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/components/ExcelFile.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ class ExcelFile extends React.Component {
4141

4242
React.Children.forEach(columns, column => {
4343
const getValue = typeof (column.props.value) === 'function' ? column.props.value : row => row[column.props.value];
44-
sheetRow.push(getValue(row) || '');
44+
const itemValue = getValue(row);
45+
sheetRow.push(isNaN(itemValue) ? (itemValue || '') : itemValue);
4546
});
4647

4748
sheetData.push(sheetRow);

0 commit comments

Comments
 (0)