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

xlsx2csv Ignores Some Global Flags #78

Closed
2 tasks done
njgray opened this issue May 21, 2019 · 2 comments
Closed
2 tasks done

xlsx2csv Ignores Some Global Flags #78

njgray opened this issue May 21, 2019 · 2 comments

Comments

@njgray
Copy link

njgray commented May 21, 2019

Prerequisites

  • make sure you're are using the latest version by csvtk version
$ csvtk version
csvtk v0.18.0

Checking new version...
You are using the latest version of csvtk

Describe your issue

When using the xlsx2csv command, the global flags -T, -D seem to be ignored or incompatible. Those are the only two flags I tried to use, so it may apply to more (all?) global flags.

Example:

testSpreadsheet.xlsx

Using the attached test spreadsheet and running csvtk xlsx2csv testSpreadsheet.xlsx -D "|" produces:

ColA,ColB,ColC,ColD
A1,B1,C1,D1
A2,B2,C2,D2
A3,B3,C3,D3
A4,B4,C4,D4
A5,B5,C5,D5

However running csvtk xlsx2csv testSpreadsheet.xlsx | csvtk cut -F -f "*" -D "|" gives the expected result:

ColA|ColB|ColC|ColD
A1|B1|C1|D1
A2|B2|C2|D2
A3|B3|C3|D3
A4|B4|C4|D4
A5|B5|C5|D5
@shenwei356
Copy link
Owner

You're right, it ignores nearly all global flags. I'll fix this.

@shenwei356
Copy link
Owner

It reacts to global flags -t, -T, -D and -E now.

Try the pre-release:

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

No branches or pull requests

2 participants