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

Support for separator declaration (used by Excel) #13

Closed
thunfischbrot opened this issue Mar 9, 2017 · 9 comments
Closed

Support for separator declaration (used by Excel) #13

thunfischbrot opened this issue Mar 9, 2017 · 9 comments

Comments

@thunfischbrot
Copy link
Contributor

In order to get Excel to always accept CSV files some of our legacy lab equipment adds a line such as

sep=,

as a first line. Trying to manipulate them, e.g. with csvtk transpose results in

[ERRO] read .\Testing.csv: The handle is invalid.

Would you consider catching this line, ignoring it and adding it to the resulting file if present? Could very well be a command-line option as well.

@shenwei356
Copy link
Owner

Does Excel support this format with leading line seq=,? Is this common?

It's not hard not implement, but still take some time.

@shenwei356
Copy link
Owner

@thunfischbrot
Copy link
Contributor Author

That would be amazing. Thank you for considering it!

@shenwei356
Copy link
Owner

I've added seamless support for data with meta line of separator declaration used by MS Excel.

See this pre-release, please download and try it. Any feedback is welcome.

Enjoy it!

@thunfischbrot
Copy link
Contributor Author

That's great! Tested it, it works for reading files with the separator line and writing the separator line into the resulting csv. Curiously though when using a file with separator it does not transpose larger files completely:
Screenshot

Here are the test files if you'd like to try them:
https://we.tl/WnLhln5lHC

Thank you for your effort, this is going to save quite some time over the coming years!

@shenwei356
Copy link
Owner

shenwei356 commented Mar 10, 2017

Fixed it in https://github.com/shenwei356/csvtk/releases/

Please test it.

@thunfischbrot
Copy link
Contributor Author

Tested. Works well on small and large files.

Incredible turn-around time. Thank you so much!

@shenwei356
Copy link
Owner

Well, I just released the v0.7.0-dev2. Make sure it's the version you tested.

Formal version will be released only after add functional tests.

@thunfischbrot
Copy link
Contributor Author

Was testing v0.7.0-dev1. Now downloaded v0.7.0-dev2, also works as advertised!

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

2 participants