Newline in xlsx header causes crash
infojunkie opened this issue · comments
Using the attached xlsx sheet, running dsq newline.xlsx --schema
generates the following error:
json: error calling MarshalJSON for type *runner.Shape: invalid character '\n' in string literal
Running dsq newline.xlsx
does not crash:
[{"Header with \nNewline":"1"},
{"Header with \nNewline":"2"},
{"Header with \nNewline":"3"},
{"Header with \nNewline":"4"}]
Removing the newline from the header cell no longer crashes the schema command.
This may also be related to #79 and https://github.com/multiprocessio/dsq/releases/tag/0.20.2
Tested this out and it's its own issue. I think I'll deal with this be dropping all newlines in column names for all file types since they all seem to break SQLite.
The issue is that bash won't insert a literal newline but other tools like printf can do that.
Thanks for the workaround! Yes, dropping the newline would simplify handling.