Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Converting .XLSX into .CSV format

Former Member
0 Likes
2,112

Dear Techies,

We have developed ABAP program which extracts various data from SAP tables and creates files.

As customer had asked for .XLSX format we gave the same.

Now customer is asking to additionally convert the files into .CSV.

From my ABAP person I understand that our current version of SAP ECC 6.0 does not support this possibility.

I am not very sure if there is any restriction in ECC6.0 version.

Can someone share their experience on this topic.

Regards

Sameer

2 REPLIES 2
Read only

matt
Active Contributor
0 Likes
1,299

You are starting in the wrong place.

In your Z program, you extract data, and presumably, before you create an XLSX file, you have all the data in a nice internal table.

Instead of converting your XLSX file to CSV - why not just write a CSV directly out of your internal table?

Read only

Former Member
0 Likes
1,299

Hi

Declare an internal table (t_transfer ) with one field ( Line of type char2000 for examp ) ==>

loop at you old internal table into wa.

concatenate wa-field1

                   wa-field2

                   .............

                   wa-field(n)

into wa_transfer-line separated by ';' .

append wa_transfer to T_transfer .

Endloop .

Then use FM GUI_DOWNLOAD or method GUI_DOWNLOAD of class CL_GUI_FRONTEND_SERVICES to transfer you new internal table to a CSV file

Thanks