File Download form Website Automatic through vb.net proggramming

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • istiyaque
    New Member
    • Feb 2008
    • 9

    File Download form Website Automatic through vb.net proggramming

    I am making a desktop application, in application, i want to download a file from website server through vb.net code using.

    on website there is a link name 'Original Data in Excel' when we click on this link its open a popup to 'Open', 'Save', or 'Cancel'
    if we click to Save button its open a browser and asking the path where we want 'save as' the file in our machine. and defaultly server providing the filename also, we can change that filename at the time 'Save as' file. and that file will save as Excel format.

    I want to save that directly in local machine without open that popup and asking where do u want to save file. Saving path hardcode in program.
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    This is not possible.

    When ta web-browser requests data, the content-type is sent along with data. If this data is not HTML then the browser attempts to find a plug-in that should handle the type of data sent. For example: if the server sends a PDF file the browser uses the Adobe plugin (if it's installed) to display the PDF. If there is no plugin installed the browser lets the user decide what to do.

    In your case you've sent an Excel file.
    As far as I know there is no no plugin that lets browsers display Excel files...but that's besides the point.

    The point here is that the browser lets the user decide what to do with data the browser doesn't know how to handle.

    -Frinny

    Comment

    • istiyaque
      New Member
      • Feb 2008
      • 9

      #3
      Originally posted by Frinavale
      This is not possible.

      When ta web-browser requests data, the content-type is sent along with data. If this data is not HTML then the browser attempts to find a plug-in that should handle the type of data sent. For example: if the server sends a PDF file the browser uses the Adobe plugin (if it's installed) to display the PDF. If there is no plugin installed the browser lets the user decide what to do.

      In your case you've sent an Excel file.
      As far as I know there is no no plugin that lets browsers display Excel files...but that's besides the point.

      The point here is that the browser lets the user decide what to do with data the browser doesn't know how to handle.

      -Frinny
      Thanks Frinny for ur reply,

      I appreciate and agre with ur reply, but is there not anyway to download a file.
      we know that downloadable file on server is excel format only.

      thanks
      istiyaque

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        I'm sorry Istiyaque but I don't understand your question.
        Could you please ask it again using different words?

        -Frinny

        Comment

        • istiyaque
          New Member
          • Feb 2008
          • 9

          #5
          ok, Frinny

          lets I will try to explain you actually i am trying to say you, if suppose we know that downloadable file from server that content-type is in excel format. and i think bydefault every machine is have installed that excel file plugin. On webpage there is alink name 'Original Data in Excel' and I want to click that link throgh our vb.net programming and clicking that link without opening that popup, we want to save that file in our local machine path which we are code in or programme.
          I think now you will be understand something what is my problem. if not then. please let me know. whats your query or which line or things did you not undrerstood.

          Thanks for your reply and support
          Istiyaque.

          Comment

          • Frinavale
            Recognized Expert Expert
            • Oct 2006
            • 9749

            #6
            Not every machine has an excel ("plugin"??) by default.
            Mine doesn't.

            I'm not even sure what you mean by "plugin".
            Wiki for: a plugin.

            Excel may be installed on the computer, but the web browser is not aware of what is installed on the computer (and never should be aware of what's installed either for security issues).


            You could consider writing your own "Excel Viewer" or seeing if there's something already out there that you can use to display the Excel file in the browser window...but I don't think this is really what you want.

            -Frinny

            Comment

            Working...