Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Up|in)sert Excel format with cell starting with " fails to parse data #248

Open
gaelguimini opened this issue Apr 6, 2023 · 0 comments

Comments

@gaelguimini
Copy link

gaelguimini commented Apr 6, 2023

Hi,

When attempting to upsert (or insert) data from Excel format fails to parse it if some cells start with ".

Steps to reproduce

  1. Create an excel workbook and sheet containing

lastname | email
"pseudo" lastname | [email protected]

  1. Copy sheet content from excel
  2. Paste into salesforce inspector with Excel format checked

Expected

The preview shows headers and the only line well parsed

Actual

The parsing fails with Error: unexpected token ' '

Cause analysis

Excel format seems to rely on csv-parser.js which checks for " at start of cell content as string identificator. In turn, the content until next " is considered for cell value (pseudo in my repro data), then cell separator is expected. It fails du to finding anything but cell separator ( in my repro data).
This is NOT helpfull for Excel content

Possible workarround

  • Sanitize cells by adding a space before starting " ( used for now)
  • Export sheet to CSV (untested)

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant