multiprocessio / dsq

Commandline tool for running SQL queries against JSON, CSV, Excel, Parquet, and more.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When a excel xlsx file has more than one sheet, how to choose the certain sheet?

gadmyth opened this issue · comments

If you don't choose the certain sheet, it'll throw DSError
DSError { "name": "Error", "message": "invalid character ',' looking for beginning of object key string", "stack": "goroutine

So, if you delete the other default created sheet2 and sheet3, and remain the only sheet1, dsq will works fine.

Yes that's right it doesn't work at the moment. The README mentions.

One thing you could do is something like:

$ dsq $excelfile | jq '$sheetname' | dsq 'select * from {}'

Because dsq doesn't yet support specifying a path within an object.

image

Separately, I am working on adding support for specifying a path. It might be available in a release next week.

This is now supported in dsq in version 0.6.0.

See the updated README for details.
image