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

Allow to specify encoding and destination path of the output file #51

Open
tchiavegatti opened this issue Sep 15, 2023 · 1 comment
Open

Comments

@tchiavegatti
Copy link

Thank you for developing this, it seems to be a very useful tool. However, when converting a xlsx file to csv with gocsv xlsx, it would be great to have the option to specify the encoding of the output `csv file.

Also, when doing a batch conversion of multiple files, it would be nice to be able to specify the destination directory for the output files instead of creating a directory for the CSVs.

@zacharysyoung
Copy link
Contributor

zacharysyoung commented Dec 1, 2023

Hi @tchiavegatti, can you clarify your comment?

it would be nice to be able to specify the destination directory for the output files instead of creating a directory for the CSVs

The xlsx command already has the -dirname option. Please provide details on what more you need; given the nature of XLS files having multiple sheets, please include an example that shows your need and how GoCSV currently doesn't meet it.

Regarding the encoding of output files... I don't think this is a good fit for GoCSV. You could try piping the output (or input) to something like iconv. Or, here's a solution I wrote up on StackOverflow for using Go and the experimental text package to convert between UTF-8 and popular code pages (encodings), https://stackoverflow.com/a/76784010/246801. I've codified all that in a simple text transcoding tool, gotxt.

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