Ignore merged cells when calculating column width

When calculating column width cells that are merged should be ignored. This is MS Excel behavior and should be handled similar in ABAP2XLSX.
This commit is contained in:
oliver-huetkoeper 2014-10-02 08:10:42 +02:00
parent c31528604e
commit 21a63fd96e

View File

@ -3174,6 +3174,10 @@ ENDMETHOD.</source>
* col_alpha = zcl_excel_common=&gt;convert_column2alpha( &lt;auto_size&gt;-col_index ).&quot; issue #155 - less restrictive typing for ip_column * col_alpha = zcl_excel_common=&gt;convert_column2alpha( &lt;auto_size&gt;-col_index ).&quot; issue #155 - less restrictive typing for ip_column
count = 1. count = 1.
WHILE count &lt;= highest_row. WHILE count &lt;= highest_row.
* Do not check merged cells
IF is_cell_merged(
ip_column = &lt;auto_size&gt;-col_index
ip_row = count ) = abap_false.
* Start of change # issue 139 - Dateretention of cellstyles * Start of change # issue 139 - Dateretention of cellstyles
* IF cell_style IS BOUND. * IF cell_style IS BOUND.
* CREATE OBJECT cell_style. * CREATE OBJECT cell_style.
@ -3201,6 +3205,7 @@ ENDMETHOD.</source>
IF width &gt; &lt;auto_size&gt;-width. IF width &gt; &lt;auto_size&gt;-width.
&lt;auto_size&gt;-width = width. &lt;auto_size&gt;-width = width.
ENDIF. ENDIF.
ENDIF.
count = count + 1. count = count + 1.
ENDWHILE. ENDWHILE.
* column_dimension = me-&gt;get_column_dimension( col_alpha ). &quot; issue #155 - less restrictive typing for ip_column * column_dimension = me-&gt;get_column_dimension( col_alpha ). &quot; issue #155 - less restrictive typing for ip_column