jandrew / Spreadsheet-XLSX-Reader-LibXML

Read spreadsheet files with xlsx extentions
Other
4 stars 2 forks source link

percentage fields return 'numeric' instead of 'percentage' as type #58

Closed Tux closed 9 years ago

Tux commented 9 years ago

$cell->type returns 'numeric' when it is percentage. For portability with Spreadsheet::ParseExcel and Spreadsheet::ParseXLSX it should return 'percentage'

jandrew commented 9 years ago

Ok I did some additional research and discovered that Spreadsheet::ParseExcel does not return 'percentage' as a type designation. My goal is to method match ~::ParseExcel. However if you want to see if a cell is receiving percent style formatting you can make the $cell call (as of v0.38.14) '$cell->get_coercion->name' (undocumented as this goes deep into the Type::Tiny guts) and it will return 'PERCENT' (for other formats INTEGER, FRACTION, DECIMAL, SCIENTIFIC, DATE, or DATESTRING)