Reading corrupted xlsx file (#663)

A cell contained text in the original template. It was lated deleted. But apparently a link to SharedStrings from the cell was not removed. An exception occurred after downloading and opening the file via ZCL_EXCELL_READER_2007 class. All operations until ZCL_EXCEL_READER_2007 were done using other tools.
This commit is contained in:
JuvickAul 2020-04-28 21:28:58 +06:00 committed by GitHub
parent 0de59b65c7
commit 1c7e527a3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2455,8 +2455,10 @@ METHOD load_worksheet.
CASE ls_cell-t.
WHEN 's'. " String values are stored as index in shared string table
lv_index = lo_ixml_value_elem->get_value( ) + 1.
READ TABLE shared_strings INTO lv_cell_value INDEX lv_index.
IF lo_ixml_value_elem IS BOUND.
lv_index = lo_ixml_value_elem->get_value( ) + 1.
READ TABLE shared_strings INTO lv_cell_value INDEX lv_index.
ENDIF.
WHEN 'inlineStr'. " inlineStr values are kept in special node
lo_ixml_value_elem = lo_ixml_cell_elem->find_from_name( name = 'is' ).
IF lo_ixml_value_elem IS BOUND.