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

Text value is modified by Spreadsheet::ParseExcel::SaveParser #6

Open
fheyer opened this issue Sep 22, 2014 · 0 comments
Open

Text value is modified by Spreadsheet::ParseExcel::SaveParser #6

fheyer opened this issue Sep 22, 2014 · 0 comments

Comments

@fheyer
Copy link

fheyer commented Sep 22, 2014

Hello,

i observed that Spreadsheet::ParseExcel::SaveParser removes leading zeros from text values in excel files.
After reading and writing out test data zeroes are missing from cell values although those are formatted as text.
This is the test file i used (produced with LibreOffice 4.1.6.2).
http://www.heyer-it.de/dl/text-with-leading-zero.xls

Put it into the same as this test program. It loads the test files with SaveParser and saves it to 'out.xls'. After running the test program you can see the difference between source file and output file 'out.xls'.

#!/usr/bin/env perl

use strict;

use Spreadsheet::ParseExcel::SaveParser;

Spreadsheet::ParseExcel::SaveParser->new()->Parse( 'text-with-leading-zero.xls' )->SaveAs( 'out.xls' );

This is my environment:

Perl version : 5.020000
OS name : darwin
Module versions: (not all are required)
Spreadsheet::ParseExcel 0.65
Scalar::Util 1.38
Unicode::Map (not installed)
Spreadsheet::WriteExcel 2.40
Parse::RecDescent 1.967009
File::Temp 0.2304
OLE::Storage_Lite 0.19
IO::Stringy 2.110

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

1 participant