|We don't bite newbies here... much|
Looking for assistance for proper fix for Spreadsheet::XLSX bug(?)by nysus (Parson)
|on May 28, 2020 at 21:06 UTC||Need Help??|
nysus has asked for the wisdom of the Perl Monks concerning the following question:
I've gotten the ball to the 4 yard line on a problem I've been working on wrt to the Spreadsheet::XLSX module. Looking for help banging this problem into the end zone. I don't know enough about XLSX parsing to properly fix this.
I'm parsing a .xlsx file generated by quickbooks. The spreadsheet has some custom format codes in it. Here's the appropriate xml from the styles.xml file embedded in the xlsx archive:
When extracting data from the cell with this custom format code, the value looked like this:'20.00 Ä'
Note the euro symbol tacked on to the end. This symbol does not show up when viewing the spreadsheet.
To get this working the way I wanted, I hacked the Spreadsheet::XLSX module. I made two changes. One to the __load_styles function:
The other change I made was to the Spreadsheet::XLSX::Fmt2007.pm module where I added in the hex values for "165" and "166" along with the format I wanted without the euro sign:
Obviously this is a bad hack. What is the proper way to fix these modules so I can have custom fomatters that work as intended when parsing an xlsx file?
$PM = "Perl Monk's";