-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load workbook does error "Cell is table column header - this value is not allowed" #1164
Comments
Hello,
DATA lv_column_name TYPE zexcel_s_fieldcatalog-column_name.
IF <fs_sheet_content> IS ASSIGNED AND <fs_sheet_content>-table_header IS NOT INITIAL.
READ TABLE <fs_sheet_content>-table->fieldcat ASSIGNING <ls_fieldcat> WITH KEY fieldname = <fs_sheet_content>-table_fieldname.
IF sy-subrc = 0.
IF ip_value IS SUPPLIED. “don’t use here lv_value is not initial
lv_column_name = lv_value.
IF <ls_fieldcat>-column_name <> lv_column_name.
zcx_excel=>raise_text( 'Cell is table column header - this value is not allowed' ).
ENDIF.
ELSE.
zcx_excel=>raise_text( 'Cell is table column header - this formula is not allowed' ).
ENDIF.
ENDIF.
ENDIF. And because of 3) the code has to move to a proper position after the main IF ip_value IS SUPPLIED. Bernd |
Hi, So I've checked deeply what is being done in "set_cell". IF <fs_sheet_content> IS ASSIGNED AND <fs_sheet_content>-table_header IS NOT INITIAL AND lv_value IS NOT INITIAL. Best regards. (*) I've found https://answers.microsoft.com/en-us/msoffice/forum/all/character-limits-for-table-headings-in-excel-2016/f23e9755-1439-48b9-900d-a815bcf12ceb#:~:text=If%20a%20cell%20has%20more,to%20255%20(with%20no%20warning) and maybe that's why fieldcatalod-Column_name is a char255 and not an String. |
Hello, this problem is caused by using method bind_table not only in the writing process but now also in the reading process. Currently this leads to the side effect that the check to protect the cell from overwriting which contains the column header To your suggestions:
Bernd |
While loading a worksheet containing a table (do it via a demo program), I get the exception ZCX_EXCEL:
It's due to this code:
abap2xlsx/src/zcl_excel_worksheet.clas.abap
Lines 3981 to 3989 in a6176d7
It's due to an extra space in the Excel file, as you can see:
and it can be seen also via the ABAP debugger:
The text was updated successfully, but these errors were encountered: