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

leading zeros are deleted in xlsx2csv command #262

Closed
5003 opened this issue Dec 3, 2023 · 3 comments
Closed

leading zeros are deleted in xlsx2csv command #262

5003 opened this issue Dec 3, 2023 · 3 comments

Comments

@5003
Copy link

5003 commented Dec 3, 2023

Hi,
When converting with the following versions, leading zeros are deleted.

  • 0.27.2
  • 0.28.0
  • 0.29.0

File: test data
Command: csvtk xlsx2csv -n example 000_cell_data.xlsx

Output:

txt
0

Version 0.27.1 does not have this problem.

shenwei356 added a commit that referenced this issue Dec 3, 2023
@shenwei356
Copy link
Owner

Thanks for reporting this.
It's fixed.

$ csvtk xlsx2csv -n example 000_cell_data.xlsx
txt
000

csvtk_darwin_amd64.tar.gz
csvtk_darwin_arm64.tar.gz
csvtk_linux_amd64.tar.gz
csvtk_windows_amd64.exe.tar.gz

@5003
Copy link
Author

5003 commented Dec 5, 2023

It works.
Thank you.

@moorereason
Copy link
Contributor

I believe #262 fixes a related issue I had after upgrading from v0.28.0 to v0.29.0:

csvtk xlsx2csv $foo | csvtk mutate2 -n Debit -w 0 -e '$Total * 100'

would generate an error:

err: Value '$175.00' cannot be used with the modifier '*', it is not a number

The cell in the Excel spreadsheet is a formula of type Currency.

After rebuilding from master (22723a7), the issue is resolved.

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

3 participants