02-11-2024 11:50 AM - edited 02-12-2024 9:09 AM
Hello All, I have a requirement, in which i need to create create and download XLSX file from Webdynpro ABAP.
I am able to create simple XLSX file and download it, but i am not able to create XLSX file with multiple worksheet.
I have data in xstring format and using cl_wd_runtime_services=>attach_file_to_response to download excel file.
Kindly guide me , how can i create multiple worksheet in same excel file in webdynpro abap.
I am following below process:
I am creating and xlsx file from webdynpro abap. I am able to create a xlsx file with one worksheet using the standard functionality of sap.
1. getting reference of internal table.
2. using cl_salv_table=>factory to create the reference of output data.
3. Using cl_salv_controller_metadata=>get_lvc_fieldcatalog to create the field catalogue.
4. Using cl_salv_ex_util=>factory_result_data_table, input is the field catalogue and the refernce internal table.
5. cl_salv_bs_tt_util=>if_salv_bs_tt_util~transform is used to transform this data in xtsring .
6. this way the xlsx created is perfect, there is no need to formatting and other issue, Xlsx cerated will be same as we get using the standard EXPORT button.
7. use cl_wd_runtime_services=>attach_file_to_response to download the xlsx file.
8. I want to add new worksheet in this excel, is there is any way, pls guide.
Thanks for your comments, let me reshape my question.
I am creating and xlsx file from webdynpro abap. I am able to create a xlsx file with one worksheet using the standard functionality of sap.
1. getting reference of internal table.
2. using cl_salv_table=>factory to create the reference of output data.
3. Using cl_salv_controller_metadata=>get_lvc_fieldcatalog to create the field catalogue.
4. Using cl_salv_ex_util=>factory_result_data_table, input is the field catalogue and the refernce internal table.
5. cl_salv_bs_tt_util=>if_salv_bs_tt_util~transform is used to transform this data in xtsring .
6. this way the xlsx created is perfect, there is no need to formatting and other issue, Xlsx cerated will be same as we get using the standard EXPORT button.
7. use cl_wd_runtime_services=>attach_file_to_response to download the xlsx file.
8. I want to add new worksheet in this excel, is there is any way, pls guide.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Thanks for your response.
I am searching from many days, but not able to get answer.
I can create Excel file, but the challenge is to create multiple worksheet in the Excel file.
If you know any answer, kindly guide me to the post.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
73 | |
8 | |
8 | |
8 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.