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

Add a option to csv2xlsx for output number as Text or number #217

Closed
4 tasks done
zuisong opened this issue Jan 29, 2023 · 3 comments
Closed
4 tasks done

Add a option to csv2xlsx for output number as Text or number #217

zuisong opened this issue Jan 29, 2023 · 3 comments
Labels

Comments

@zuisong
Copy link

zuisong commented Jan 29, 2023

Prerequisites

  • make sure you're are using the latest version by csvtk version
  • read the usage

Describe your issue

  • describe the problem
  • provide a reproducible example

Thank you

$ echo 8911111111111111111111111173 | csvtk  -H csv2xlsx -o /tmp/tempfile  &&  csvtk xlsx2csv   /tmp/tempfile
8911111111111111000000000000

output has lost some text.

Maybe we can add a option to csv2xlsx control output number as Text or number.
It seems like

$ echo 8911111111111111111111111173 | csvtk  -H csv2xlsx --number-as-text -o /tmp/tempfile  &&  csvtk xlsx2csv   /tmp/tempfile
8911111111111111111111111173
@zuisong
Copy link
Author

zuisong commented Jan 29, 2023

Link issue: #192

@zuisong zuisong changed the title Add a option for output number as Text or number Add a option to csv2xlsx for output number as Text or number Jan 29, 2023
@shenwei356 shenwei356 added the bug label Jan 29, 2023
@shenwei356
Copy link
Owner

oh, right, it should be optional.

@shenwei356
Copy link
Owner

Added a flag.

  -f, --format-numbers   save numbers in number format, instead of text

csvtk_linux_amd64.tar.gz

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

No branches or pull requests

2 participants