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

Cannot force a cell to be written as a string even if it 'looks like a number' #3

Open
KevinField opened this issue Jun 14, 2014 · 0 comments

Comments

@KevinField
Copy link

I have a sheet of part numbers, which are not numbers. E.g. when I write 27E121 I mean the literal string "27E121", not the number 2.7e+122. I have tried setting Key123 to 1, setting $template->{FormatStr}->{$template->{Format}[$format_number]->{FmtIdx}} = '@', setting Type to 'Text', and even though the cell's value() is correct just before writing, if I reopen and parse the file and get the same cell's value() immediately after, it has been written as 2.7e+122 (or if I open it in Apache OpenOffice 4.)

I believe that this is because Spreadsheet-ParseExcel-0.65/lib/Spreadsheet/ParseExcel/SaveParser/Workbook.pm just calls $oWrS->write(), which then seems to ignore FormatStr, and/or Type, but I'm not sure. This is just my workaround, if I redefine SaveAs and just replace that write() with write_string(), all is well.

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