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

Fix an error when pasting from .xls file

Open sonmansu opened this issue 1 year ago • 2 comments

This fixes #267

this error happens when pasting value from .xls file (.xlsx is fine)

image

sonmansu avatar Apr 26 '24 09:04 sonmansu

Deploy Preview for react-datasheet-grid canceled.

Name Link
Latest commit 4e7e56e12c458dfa67dc6278a8856ede4fa6aa71
Latest deploy log https://app.netlify.com/sites/react-datasheet-grid/deploys/662b7072f6e5b60008753f5f

netlify[bot] avatar Apr 26 '24 09:04 netlify[bot]

I have the same issue, but I don't see how the commit here fixes the issue. As I understand it, value is undefined, therefore you can't call value.replace at all. A better option might be: ((value?.replace(/[\n\r]+/g, ' ') ?? '').trim() || (null as unknown)) as T,

gouldingken avatar Jun 30 '24 02:06 gouldingken