Skip to Content
0

How to read csv \ XLS from FTP server

May 05 at 04:19 AM

74

avatar image
Former Member

Hi,

I have the requirement in which i have to read .csv file through ftp . I have done almost but the data coming is not in readable format .

Please suggest .

Regards

Rakesh Kumar Singhdata-output.png

data-output.png (359.6 kB)
data.png (359.6 kB)
10 |10000 characters needed characters left characters exceeded
Former Member

Data coming in internal table starting with PK########### .


0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Antal Perger
May 05 at 07:01 AM
0

Hi Rakesh,

The file starts with "PK.." which indicates it is a ZIP archive, not a plain CSV file. First you need to extract the archive and then process the file.

Best regards,

Antal

Show 4 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Could you please let me know how to extract the archive file .

0

Unzipping using ABAP is FAQ. Please search.

0
Former Member

Hi

File in remote system is not ZIP . I would be grateful if any one can share some sample code below is my requirement .

"I have to read .csv file through ftp"

0

You do not need code to read .csv file through ftp. There's no requirement to keep repeating that. Your issue is that once you've got the file, you're having difficulty processing it.

It is abundantly clear that the issue is that your file is not a text file ( csv). In all probability it is an xlsx file (even if it is named .csv). An xlsx file is a zipped file. It just doesn't have a .zip suffix.

You need code to read an xlsx file, as that is what you appear to be receiving. There are plenty of examples of how to do that, if you will search. xls will be considerably harder though.

0