05-05-2018 5:19 AM
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
05-05-2018 5:34 AM
Data coming in internal table starting with PK########### .
05-05-2018 8:01 AM
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
05-05-2018 9:23 AM
Could you please let me know how to extract the archive file .
05-06-2018 7:12 AM
05-07-2018 8:16 AM
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"
05-07-2018 9:26 AM
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.