Update spreadsheet.js to handle quotes cells #102
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As reported in https://groups.google.com/d/msgid/dataverse-community/ef52665f-2348-413b-9181-0aad860316c1n%40googlegroups.com?utm_medium=email&utm_source=footer, the current previewer isn't handling cells that are in quotes (and have a comma inside them).
This PR tries to address that by setting delimitersToGuess: to just support the '\t' and ',' delimiters we use for tsv/csv files. The PR also sets the quoteChar to '"'. It's not clear that's needed.
I did some basic testing at QDR and these changes fix the problem in email and don't appear to break parsing of existing csv/tsv files that don't have commas inside quoted tab separated cells.