Skip to Content
avatar image
Former Member

How to read csv \ XLS from FTP server


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 .


Rakesh Kumar Singhdata-output.png

data-output.png (359.6 kB)
data.png (359.6 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • May 05, 2018 at 07: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,


    Add comment
    10|10000 characters needed characters exceeded

    • 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.