Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.9.4

Bug #13171 Built-in styles missing
Submitted: 2008-02-21 17:59 UTC
From: rweed Assigned: cschmitz
Status: Assigned Package: Spreadsheet_Excel_Writer (version CVS)
PHP Version: 5.2.5 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2008-02-21 17:59 UTC] rweed (Russell Weed)
Description: ------------ With any spreadsheet generated by Spreadsheet_Excel_Writer, if you open it in Excel and click the Currency, Comma, or Percent buttons in the toolbar, you're given the error "Style 'Currency' not found." (obviously swap Currency for Comma/Percent where appropriate) This is because the default formats are not being built into the file. To see what I mean, click Format->Style and notice that "Normal" is the only style in the dropdown. Use Excel to create a new workbook, and go to Format->Style in it and you'll notice there are 4 other styles Excel creates by default: - Comma - Comma [0] - Currency - Currency [0] - Percent I did a little digging and I was looking at the Perl module Spreadsheet::WriteExcel, which Spreadsheet_Excel_Writer is based on, and comparing the code it appears this was fixed in the Perl version since it was ported. See http://search.cpan.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.20/lib/Spreadsheet/WriteExcel/Workbook.pm lines 103-107 to see what I mean, though there are other areas that reference these new built-in styles. I tried to fix this on my own, and got as far as having the styles included in the file so you didn't get an error, however I was never able to have them contain any actual style information (they were always using the Normal style). Hope this info helps. Test script: --------------- No special script needed, as problem occurs with any spreadsheet generated by Spreadsheet_Excel_Writer

Comments

 [2008-09-30 17:36 UTC] jamespaige (James Paige)
A fix to this bug would be valuable for my employer. I could probably arrange for a bug bounty to be payed to the individual who fixes this. Would any developers be interested? If so, how much $ would be required?
 [2013-03-07 00:37 UTC] obarshay (Oleg Barshay)
 [2013-03-07 00:38 UTC] obarshay (Oleg Barshay)
I ported the relevant code from the Perl implementation and attached a patch against 0.9.3 for anyone that needs it.
 [2013-03-07 03:18 UTC] cschmitz (Carsten Schmitz)
-Assigned To: +Assigned To: cschmitz