react-datasheet-grid
react-datasheet-grid copied to clipboard
Cannot read properties of undefined (reading 'replace') - when pasting from Excel
This sometimes happens when pasting multiples rows and columns directly from Excel.
TypeError: Cannot read properties of undefined (reading 'replace')
at parsePastedValue (.../columns/textColumn.js:127:460)
at Object.pasteValue (.../columns/textColumn.js:140:36)
at pasteValue (.../columns.keyColumn.js:66:139)
at ...DataSheetGrid.js:565:69
this: undefined
value: Object
Generally happens with long datasets (~100 rows). Haven't yet been able to see a pattern with regard to which row it's pasting when failure occurs (2, 10, ...). Always the same row with each dataset, even if all the rows look the same.
Can you share the excel file with a reproductible dataset?
This error happens on .xls file. (.xlsx is ok. .xls file only)
i want to share this file but i don't have privilege with Microsoft 365 ...
Is there any update here?
Attached is a file that will reliably fail the copy paste.
Select all content in the table.
Paste into a data sheet where all columns are textColumn.