react-datasheet-grid icon indicating copy to clipboard operation
react-datasheet-grid copied to clipboard

Cannot read properties of undefined (reading 'replace') - when pasting from Excel

Open larissa-n opened this issue 2 years ago • 4 comments

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.

larissa-n avatar Feb 24 '23 13:02 larissa-n

Can you share the excel file with a reproductible dataset?

nick-keller avatar Feb 24 '23 14:02 nick-keller

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 ... image

sonmansu avatar Apr 26 '24 08:04 sonmansu

Is there any update here?

ryanbitonio avatar May 31 '24 03:05 ryanbitonio

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.

Broken Copy Paste.xlsx

gouldingken avatar Jun 30 '24 02:06 gouldingken