jandrew / Spreadsheet-XLSX-Reader-LibXML

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

Empty Coercion's causing the read to fail #75

Closed jandrew closed 9 years ago

jandrew commented 9 years ago

Submitted via email

The value in the cell in question is "69". I collaped Spreadsheet::XLSX::Reader::LibXML down to just "XLSX" to shorten the lines a bit.

Attribute (cell_coercion) does not pass the type constraint because: Undef did not pass type constraint "HasMethods["assert_coerce","display_name"]" at constructor XLSX::Cell::new (defined at /usr/lib/perl5/site_perl/5.20.2/Spreadsheet/XLSX/Reader/LibXML/Cell.pm line 257) line 45 XLSX::Cell::new('XLSX::Cell', 'r', 'G3520', 'cell_coercion', undef, 'cell_font', 'HASH(0xa93c2c8)', 'cell_fill', 'HASH(0xa936758)', 'cell_type', 'Numeric', 'cell_border', 'HASH(0xaadd1d8)', 'cell_unformatted', 69, 'error_inst', 'XLSX::Error=HASH(0xa7009e0)', 'cell_xml_value', 69, 'cell_col', 6, 'cell_alignment', 'HASH(0xbbd23e8)', 'cell_row', 3519) called at /usr/lib/perl5/site_perl/5.20.2/Spreadsheet/XLSX/Reader/LibXML/GetCell.pm line 675 XLSX::GetCell::_build_out_the_cell('WorksheetInstance=HASH(0xa92d6a8)', 'HASH(0xbbda3b0)') called at /usr/lib/perl5/site_perl/5.20.2/Spreadsheet/XLSX/Reader/LibXML/GetCell.pm line 96 XLSX::GetCell::get_cell('WorksheetInstance=HASH(0xa92d6a8)', 3519, 6) called at /web/perl/Import/XXXXXXXXX.pm line 385 Import::XXXXXXXXXX::load_database('Import::XXXXXXXXX=HASH(0x85c5f10)', 'xxxx-xxxx-XXXXXXXXX.xlsx') called at /home/~XXXXX.pl line 106

Thanks Todd

jandrew commented 9 years ago

I will try and assign a milstone once I have an assessment of the test case

jandrew commented 9 years ago

OK this looks like another hard one to write a test case fail -> pass for. However I know where the fail is and I can stop from passing empty values for the attribute 'cell_coercion' on cell creation. I will just delete the attribute key in the cell creation argument ref. It seems like if you didn't have it filled out by then you probably didn't want it anyway. It may also be a friday afternoon but I will roll the fix for this one without a specific test case.

jandrew commented 9 years ago

Closed with release v0.38.16