none
How to Download Excel file from a website programatically c# RRS feed

  • Question

  • Team,

    I want to download all the Excel files from a website and put it to the server location eg. “C:\\ test” using windows application.

    Please help me on this.

    Thanks in advance.

    • Moved by Stanly Fan Wednesday, August 16, 2017 8:02 AM from windows form
    Thursday, August 3, 2017 9:38 AM

All replies

  • It is "C:\test\sometong.xls" (one backslash following "C:")? And file name is missing?

    (You should have previlege of a folder where the file is downloaded)


    Ashidacchi

    Thursday, August 3, 2017 10:49 AM
  • well ... That is only for example.   Can you please suggest how to download these files using code.
    Thursday, August 3, 2017 10:59 AM
  • Can't you use simple methods like

    My.Computer.Network.DownloadFile("http://cdn.pcwallart.com/images/tropical-island-paradise-sunset-wallpaper-2.jpg", "c:\testdownload.jpg")

    Thursday, August 3, 2017 11:09 AM
  • I have a website where multiple EXCEL files are available. I want to download all these files.
    Thursday, August 3, 2017 12:09 PM
  • I have a website where multiple EXCEL files are available. I want to download all these files.

    Then use Network.DownloadFile or WebRequest in a loop (plenty of samples from Google like Downloading Files with the WebRequest and WebResponse Classes)

    • Edited by Castorix31 Thursday, August 3, 2017 12:31 PM
    • Proposed as answer by Stanly Fan Monday, August 14, 2017 4:17 AM
    Thursday, August 3, 2017 12:31 PM