Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Downloading file from remote location

Downloading file from remote location

Scheduled Pinned Locked Moved C#
tutorialalgorithmshelpquestion
9 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kaliem
    wrote on last edited by
    #1

    Hi all, I want to download an xls file from remote location (Please note that its not FTP , its live ip, like myip/shared/info.xls) .I have been searching for any class or library but no success till yet. Can someone help me ? Thanks in advance. Also, please guide how to open an excel file for reading data from it. Thanks Kaliem

    S K N 3 Replies Last reply
    0
    • K kaliem

      Hi all, I want to download an xls file from remote location (Please note that its not FTP , its live ip, like myip/shared/info.xls) .I have been searching for any class or library but no success till yet. Can someone help me ? Thanks in advance. Also, please guide how to open an excel file for reading data from it. Thanks Kaliem

      S Offline
      S Offline
      Scott Dorman
      wrote on last edited by
      #2

      If you can access the file over HTTP, you can use something like this: http://www.codeproject.com/cs/library/filedownloader.asp[^]

      ----------------------------- In just two days, tomorrow will be yesterday.

      1 Reply Last reply
      0
      • K kaliem

        Hi all, I want to download an xls file from remote location (Please note that its not FTP , its live ip, like myip/shared/info.xls) .I have been searching for any class or library but no success till yet. Can someone help me ? Thanks in advance. Also, please guide how to open an excel file for reading data from it. Thanks Kaliem

        K Offline
        K Offline
        kaliem
        wrote on last edited by
        #3

        ah sorry, I forgot to inform, I am trying this with windows forms application, not web application, I guess incase of web, you can also do that using Response object, but I am looking for some control/class/library in windows app. kaliem

        1 Reply Last reply
        0
        • K kaliem

          Hi all, I want to download an xls file from remote location (Please note that its not FTP , its live ip, like myip/shared/info.xls) .I have been searching for any class or library but no success till yet. Can someone help me ? Thanks in advance. Also, please guide how to open an excel file for reading data from it. Thanks Kaliem

          N Offline
          N Offline
          Not Active
          wrote on last edited by
          #4

          What do you mean "remote location"? Across your network or the internet?


          only two letters away from being an asset

          K 1 Reply Last reply
          0
          • N Not Active

            What do you mean "remote location"? Across your network or the internet?


            only two letters away from being an asset

            K Offline
            K Offline
            kaliem
            wrote on last edited by
            #5

            Both! I want to be able to access files over my network and internet. like the file URL would be something like ipaddress/foldername/filename.xls

            N 1 Reply Last reply
            0
            • K kaliem

              Both! I want to be able to access files over my network and internet. like the file URL would be something like ipaddress/foldername/filename.xls

              N Offline
              N Offline
              Not Active
              wrote on last edited by
              #6

              Process.Start("IExplore.exe", "\\ipaddress\foldername\filename.xls "); Process.Start("IExplore.exe", "http:\\ipaddress\foldername\filename.xls "); Provided the files is accessable from http of course.


              only two letters away from being an asset

              K 1 Reply Last reply
              0
              • N Not Active

                Process.Start("IExplore.exe", "\\ipaddress\foldername\filename.xls "); Process.Start("IExplore.exe", "http:\\ipaddress\foldername\filename.xls "); Provided the files is accessable from http of course.


                only two letters away from being an asset

                K Offline
                K Offline
                kaliem
                wrote on last edited by
                #7

                thanks for that, yes the file is accessible from http. Yet to implement that code but my guess is, it would prompt the user to download that file. Is that possible if we can just save the file in a specific place instead of prompting. Kaliem

                S N 2 Replies Last reply
                0
                • K kaliem

                  thanks for that, yes the file is accessible from http. Yet to implement that code but my guess is, it would prompt the user to download that file. Is that possible if we can just save the file in a specific place instead of prompting. Kaliem

                  S Offline
                  S Offline
                  Scott Dorman
                  wrote on last edited by
                  #8

                  Kaliem, See my first response to your question. The component described in the article does what you are asking. It takes a URL to a file over HTTP and downloads it to a given location.

                  ----------------------------- In just two days, tomorrow will be yesterday.

                  1 Reply Last reply
                  0
                  • K kaliem

                    thanks for that, yes the file is accessible from http. Yet to implement that code but my guess is, it would prompt the user to download that file. Is that possible if we can just save the file in a specific place instead of prompting. Kaliem

                    N Offline
                    N Offline
                    Not Active
                    wrote on last edited by
                    #9

                    Because the process being started is IE it will attempt to open the file just as any valid URI, however because of the file association IE will use MS Excel as the viewer. There is no need to download the file.


                    only two letters away from being an asset

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups