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

fix: fix export excel with leading zero #9011

Merged
merged 1 commit into from
Sep 19, 2023
Merged

Conversation

benbenben2
Copy link
Collaborator

What

Exported Excels do not contain leading zeros for the barcode.

Adding "$worksheet->keep_leading_zeros();" seems to solve the issue.

See: https://metacpan.org/pod/Spreadsheet::WriteExcel#keep_leading_zeros()

CSV seems not having this issue:
Screenshot_20230917_121541

Screenshot

Result locally:
Screenshot_20230917_115311

Related issue(s) and discussion

@benbenben2 benbenben2 added 🐛 bug This is a bug, not a feature request. CSV exports labels Sep 17, 2023
@benbenben2 benbenben2 requested a review from a team as a code owner September 17, 2023 11:55
@benbenben2 benbenben2 self-assigned this Sep 17, 2023
@sonarcloud
Copy link

sonarcloud bot commented Sep 17, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (main@a0e358e). Click here to learn what that means.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##             main    #9011   +/-   ##
=======================================
  Coverage        ?   46.11%           
=======================================
  Files           ?       64           
  Lines           ?    19851           
  Branches        ?     4795           
=======================================
  Hits            ?     9155           
  Misses          ?     9529           
  Partials        ?     1167           
Files Changed Coverage Δ
lib/ProductOpener/Export.pm 61.22% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@stephanegigandet stephanegigandet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonderful, thanks for fixing this!

@stephanegigandet stephanegigandet merged commit f05ede9 into main Sep 19, 2023
14 checks passed
@stephanegigandet stephanegigandet deleted the fix_export_excel_6782 branch September 19, 2023 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug This is a bug, not a feature request. CSV exports export
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Barcodes stored as numbers instead of strings in Excel and CSV exports
4 participants