cancel
Showing results for 
Search instead for 
Did you mean: 

[abap2xlsx] page break preview

minhoi
Member
0 Kudos

I am making excel file to download by using abap2xlsx.

But I have an issue.

  1. I uploaded an excel template on "smw0" which has a setting of "PAGE BREAK PREVIEW".
  2. If I download it without abap2xlsx, the setting of page break preview maintains.
  3. However, i have to write on that template and then download.
    in that process, i use abap2xlsx classes, but the setting of page break preview are cleared.
    I don't know why, and i don't know how to solve the problem

***what is page break preview?*********************************************************************************************

This is an example of "Page Break Preview". Because of the security policy, i post the link alternatively.

https://support.microsoft.com/en-us/office/insert-move-or-delete-page-breaks-in-a-worksheet-ad3dc726...

on the view tab, in the workbook views group, click page break preview.

And then you can see blue lines.

I want to set this the blue lines.

***what is page break preview?*********************************************************************************************

Can you help me? it s urgent.

below is the code which has problem:

DATA(ls_key) = VALUE wwwdatatab( relid = 'MI' objid = 'TEMPLATE' ).

CALL FUNCTION 'WWWDATA_IMPORT'
EXPORTING
key = ls_key
TABLES
mime = lt_mime
EXCEPTIONS
wrong_object_type = 1
import_error = 2
OTHERS = 3.

IF sy-subrc <> 0.
RETURN.
ENDIF.

TRY.
lv_templ_xstr = cl_bcs_convert=>xtab_to_xstring( lt_mime ).
CATCH cx_bcs.
RETURN.
ENDTRY.

CREATE OBJECT lo_reader TYPE zcl_excel_reader_2007.
lo_excel = lo_reader->load( lv_templ_xstr ).

cl_writer = NEW zcl_excel_writer_2007( ).

DATA(lv_xstring) = cl_writer->write_file( lo_excel ).

cl_wd_runtime_services=>attach_file_to_response(
EXPORTING
i_filename = 'test'
i_content = lv_xstring
i_mime_type = lc_mim_type
).

Accepted Solutions (0)

Answers (0)