Professional Web Applications Themes

Saving Excel to web site - ASP

Hi, Given below is my task. An user can open the xls file from my website (loaded on the top frame). After filling the Excel, he can click a send button at the bottom frame. By clicking the button i have to save the file in a shared directory on the web server by a unique name. Is it possible ? Any tips of how to do this ?...

  1. #1

    Default Saving Excel to web site

    Hi,

    Given below is my task.

    An user can open the xls file from my website (loaded on the top frame).
    After filling the Excel, he can click a send button at the bottom frame. By
    clicking the button i have to save the file in a shared directory on the web
    server by a unique name.

    Is it possible ?

    Any tips of how to do this ?






    Vikram Guest

  2. #2

    Default Saving Excel to web site

    Hi,

    Given below is my task.

    An user can open the xls file from my website (loaded on the top frame).
    After filling the Excel, he can click a send button at the bottom frame. By
    clicking the button i have to save the file in a shared directory on the web
    server by a unique name.

    Is it possible ?

    Any tips of how to do this ?






    Vikram Guest

  3. #3

    Default Re: Saving Excel to web site

    You cannot directly save the opened excel file onto the server from the
    client machine (as far as I know). But you could have it saved on the client
    system and then uploaded to the server using a file upload code.

    Clicking the Send button should then handle the following:

    1) Save and close the excel file to the client machine (to some pre-defined
    folder .. or could prompt the user to save it using Save Dialog box
    2) Then upload the file to the pre-defined server directory. You could
    append the timestamp with the filename to make it unique.

    Hope this helps. Feel free to ask if you need more clarification on the same


    SPA

    "Vikram" <gwvedmondhotmail.com> wrote in message
    news:eFUIaAgRDHA.1972TK2MSFTNGP11.phx.gbl...
    > Hi,
    >
    > Given below is my task.
    >
    > An user can open the xls file from my website (loaded on the top frame).
    > After filling the Excel, he can click a send button at the bottom frame.
    By
    > clicking the button i have to save the file in a shared directory on the
    web
    > server by a unique name.
    >
    > Is it possible ?
    >
    > Any tips of how to do this ?
    >
    >
    >
    >
    >
    >

    SPA Guest

  4. #4

    Default Re: Saving Excel to web site

    You cannot directly save the opened excel file onto the server from the
    client machine (as far as I know). But you could have it saved on the client
    system and then uploaded to the server using a file upload code.

    Clicking the Send button should then handle the following:

    1) Save and close the excel file to the client machine (to some pre-defined
    folder .. or could prompt the user to save it using Save Dialog box
    2) Then upload the file to the pre-defined server directory. You could
    append the timestamp with the filename to make it unique.

    Hope this helps. Feel free to ask if you need more clarification on the same


    SPA

    "Vikram" <gwvedmondhotmail.com> wrote in message
    news:eFUIaAgRDHA.1972TK2MSFTNGP11.phx.gbl...
    > Hi,
    >
    > Given below is my task.
    >
    > An user can open the xls file from my website (loaded on the top frame).
    > After filling the Excel, he can click a send button at the bottom frame.
    By
    > clicking the button i have to save the file in a shared directory on the
    web
    > server by a unique name.
    >
    > Is it possible ?
    >
    > Any tips of how to do this ?
    >
    >
    >
    >
    >
    >

    SPA Guest

  5. #5

    Default Re: Saving Excel to web site

    Hi

    You can find VB code to invoke the File Open / Save dialog boxes. They need to be tweaked to VBScript for it to work in ASP.

    If you can get the reference to the Excel workbook object in the lower frame, then you can save it using the syntax:

    Activeworkbook.SaveAs filename:=Application.GetSaveAsFilename
    (This is the VB Code)

    In VB Script, you need to define the Excel Application and Workbook objects using CreteObject and then call the corresponding methods.

    Dim oExcelApp ' excel.Application
    Dim oWs ' excel.Worksheet
    Dim oWb ' excel.Workbook
    Dim strFileName ' String

    Set oExcelApp = CreateObject("EXCEL.APPLICATION")
    Set oWs = oExcelApp.ActiveSheet
    Set oWb = oExcelApp.ActiveWorkbook

    strFileName = <Filename used when opening the Excel file>
    oWb.SaveAs strFilename

    (You must set a reference to Excel in the Project | References dialog)

    Refer to the following link for an idea on how to use the Excel Application object.
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/modcore/html/deovrworkingwithmicrosoftexcelobjects.asp[/url]

    You could use the same filename you used to open the excel sheet while saving to the local system too. Once the file is saved, redirect the control to FileUpload page and pass the name of the file (and path if needed) for it to upload the same.

    In VB its possible to invoke the SaveAs dialog but I am not sure if we can do that in VBScript by replacing:
    strFileName = <Filename used when opening the Excel file>
    with
    strFileName = Application.GetSaveAsFilename (You could give it a try)

    Hope this helps
    SPA


    "Vikram" <gwvedmondhotmail.com> wrote in message news:OHFOCwrRDHA.1924TK2MSFTNGP12.phx.gbl...
    > Hi,
    > Thanks for the same. That was clear.
    >
    > Can u point out how to save the modified excel by clicking a button save
    > (placed on the lower frame) in IE. When u say "save it using Save Dialog
    > box", it is possible to invoke that dialog box programatically ??
    >
    > Thanks again for your help.
    >
    > Vikram
    >
    >
    >
    > "SPA" <shibu_abrahamusswi.com> a écrit dans le message de
    > news:OwmZ7ikRDHA.632TK2MSFTNGP12.phx.gbl...
    > > You cannot directly save the opened excel file onto the server from the
    > > client machine (as far as I know). But you could have it saved on the
    > client
    > > system and then uploaded to the server using a file upload code.
    > >
    > > Clicking the Send button should then handle the following:
    > >
    > > 1) Save and close the excel file to the client machine (to some
    > pre-defined
    > > folder .. or could prompt the user to save it using Save Dialog box
    > > 2) Then upload the file to the pre-defined server directory. You could
    > > append the timestamp with the filename to make it unique.
    > >
    > > Hope this helps. Feel free to ask if you need more clarification on the
    > same
    > >
    > >
    > > SPA
    > >
    > > "Vikram" <gwvedmondhotmail.com> wrote in message
    > > news:eFUIaAgRDHA.1972TK2MSFTNGP11.phx.gbl...
    > > > Hi,
    > > >
    > > > Given below is my task.
    > > >
    > > > An user can open the xls file from my website (loaded on the top frame).
    > > > After filling the Excel, he can click a send button at the bottom frame.
    > > By
    > > > clicking the button i have to save the file in a shared directory on the
    > > web
    > > > server by a unique name.
    > > >
    > > > Is it possible ?
    > > >
    > > > Any tips of how to do this ?
    > > >
    > > >
    > > >
    > > >
    > > >
    > > >
    > >
    > >
    >
    >
    SPA Guest

  6. #6

    Default Re: Saving Excel to web site

    Hi

    You can find VB code to invoke the File Open / Save dialog boxes. They need to be tweaked to VBScript for it to work in ASP.

    If you can get the reference to the Excel workbook object in the lower frame, then you can save it using the syntax:

    Activeworkbook.SaveAs filename:=Application.GetSaveAsFilename
    (This is the VB Code)

    In VB Script, you need to define the Excel Application and Workbook objects using CreteObject and then call the corresponding methods.

    Dim oExcelApp ' excel.Application
    Dim oWs ' excel.Worksheet
    Dim oWb ' excel.Workbook
    Dim strFileName ' String

    Set oExcelApp = CreateObject("EXCEL.APPLICATION")
    Set oWs = oExcelApp.ActiveSheet
    Set oWb = oExcelApp.ActiveWorkbook

    strFileName = <Filename used when opening the Excel file>
    oWb.SaveAs strFilename

    (You must set a reference to Excel in the Project | References dialog)

    Refer to the following link for an idea on how to use the Excel Application object.
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/modcore/html/deovrworkingwithmicrosoftexcelobjects.asp[/url]

    You could use the same filename you used to open the excel sheet while saving to the local system too. Once the file is saved, redirect the control to FileUpload page and pass the name of the file (and path if needed) for it to upload the same.

    In VB its possible to invoke the SaveAs dialog but I am not sure if we can do that in VBScript by replacing:
    strFileName = <Filename used when opening the Excel file>
    with
    strFileName = Application.GetSaveAsFilename (You could give it a try)

    Hope this helps
    SPA


    "Vikram" <gwvedmondhotmail.com> wrote in message news:OHFOCwrRDHA.1924TK2MSFTNGP12.phx.gbl...
    > Hi,
    > Thanks for the same. That was clear.
    >
    > Can u point out how to save the modified excel by clicking a button save
    > (placed on the lower frame) in IE. When u say "save it using Save Dialog
    > box", it is possible to invoke that dialog box programatically ??
    >
    > Thanks again for your help.
    >
    > Vikram
    >
    >
    >
    > "SPA" <shibu_abrahamusswi.com> a écrit dans le message de
    > news:OwmZ7ikRDHA.632TK2MSFTNGP12.phx.gbl...
    > > You cannot directly save the opened excel file onto the server from the
    > > client machine (as far as I know). But you could have it saved on the
    > client
    > > system and then uploaded to the server using a file upload code.
    > >
    > > Clicking the Send button should then handle the following:
    > >
    > > 1) Save and close the excel file to the client machine (to some
    > pre-defined
    > > folder .. or could prompt the user to save it using Save Dialog box
    > > 2) Then upload the file to the pre-defined server directory. You could
    > > append the timestamp with the filename to make it unique.
    > >
    > > Hope this helps. Feel free to ask if you need more clarification on the
    > same
    > >
    > >
    > > SPA
    > >
    > > "Vikram" <gwvedmondhotmail.com> wrote in message
    > > news:eFUIaAgRDHA.1972TK2MSFTNGP11.phx.gbl...
    > > > Hi,
    > > >
    > > > Given below is my task.
    > > >
    > > > An user can open the xls file from my website (loaded on the top frame).
    > > > After filling the Excel, he can click a send button at the bottom frame.
    > > By
    > > > clicking the button i have to save the file in a shared directory on the
    > > web
    > > > server by a unique name.
    > > >
    > > > Is it possible ?
    > > >
    > > > Any tips of how to do this ?
    > > >
    > > >
    > > >
    > > >
    > > >
    > > >
    > >
    > >
    >
    >
    SPA Guest

  7. #7

    Default Re: Saving Excel to web site

    You could also use the following link for reference:

    [url]http://www.serverwatch.com/tutorials/article.php/1493331[/url]

    [url]http://www.microsoft.com/OfficeDev/Articles/OPG/004/004.htm[/url]

    [url]http://www.intranetjournal.com/articles/200002/wd_02_25_00b.html[/url]


    "Vikram" <gwvedmondhotmail.com> wrote in message
    news:OHFOCwrRDHA.1924TK2MSFTNGP12.phx.gbl...
    > Hi,
    > Thanks for the same. That was clear.
    >
    > Can u point out how to save the modified excel by clicking a button save
    > (placed on the lower frame) in IE. When u say "save it using Save Dialog
    > box", it is possible to invoke that dialog box programatically ??
    >
    > Thanks again for your help.
    >
    > Vikram
    >
    >
    >
    > "SPA" <shibu_abrahamusswi.com> a écrit dans le message de
    > news:OwmZ7ikRDHA.632TK2MSFTNGP12.phx.gbl...
    > > You cannot directly save the opened excel file onto the server from the
    > > client machine (as far as I know). But you could have it saved on the
    > client
    > > system and then uploaded to the server using a file upload code.
    > >
    > > Clicking the Send button should then handle the following:
    > >
    > > 1) Save and close the excel file to the client machine (to some
    > pre-defined
    > > folder .. or could prompt the user to save it using Save Dialog box
    > > 2) Then upload the file to the pre-defined server directory. You could
    > > append the timestamp with the filename to make it unique.
    > >
    > > Hope this helps. Feel free to ask if you need more clarification on the
    > same
    > >
    > >
    > > SPA
    > >
    > > "Vikram" <gwvedmondhotmail.com> wrote in message
    > > news:eFUIaAgRDHA.1972TK2MSFTNGP11.phx.gbl...
    > > > Hi,
    > > >
    > > > Given below is my task.
    > > >
    > > > An user can open the xls file from my website (loaded on the top
    frame).
    > > > After filling the Excel, he can click a send button at the bottom
    frame.
    > > By
    > > > clicking the button i have to save the file in a shared directory on
    the
    > > web
    > > > server by a unique name.
    > > >
    > > > Is it possible ?
    > > >
    > > > Any tips of how to do this ?
    > > >
    > > >
    > > >
    > > >
    > > >
    > > >
    > >
    > >
    >
    >

    SPA Guest

  8. #8

    Default Re: Saving Excel to web site

    You could also use the following link for reference:

    [url]http://www.serverwatch.com/tutorials/article.php/1493331[/url]

    [url]http://www.microsoft.com/OfficeDev/Articles/OPG/004/004.htm[/url]

    [url]http://www.intranetjournal.com/articles/200002/wd_02_25_00b.html[/url]


    "Vikram" <gwvedmondhotmail.com> wrote in message
    news:OHFOCwrRDHA.1924TK2MSFTNGP12.phx.gbl...
    > Hi,
    > Thanks for the same. That was clear.
    >
    > Can u point out how to save the modified excel by clicking a button save
    > (placed on the lower frame) in IE. When u say "save it using Save Dialog
    > box", it is possible to invoke that dialog box programatically ??
    >
    > Thanks again for your help.
    >
    > Vikram
    >
    >
    >
    > "SPA" <shibu_abrahamusswi.com> a écrit dans le message de
    > news:OwmZ7ikRDHA.632TK2MSFTNGP12.phx.gbl...
    > > You cannot directly save the opened excel file onto the server from the
    > > client machine (as far as I know). But you could have it saved on the
    > client
    > > system and then uploaded to the server using a file upload code.
    > >
    > > Clicking the Send button should then handle the following:
    > >
    > > 1) Save and close the excel file to the client machine (to some
    > pre-defined
    > > folder .. or could prompt the user to save it using Save Dialog box
    > > 2) Then upload the file to the pre-defined server directory. You could
    > > append the timestamp with the filename to make it unique.
    > >
    > > Hope this helps. Feel free to ask if you need more clarification on the
    > same
    > >
    > >
    > > SPA
    > >
    > > "Vikram" <gwvedmondhotmail.com> wrote in message
    > > news:eFUIaAgRDHA.1972TK2MSFTNGP11.phx.gbl...
    > > > Hi,
    > > >
    > > > Given below is my task.
    > > >
    > > > An user can open the xls file from my website (loaded on the top
    frame).
    > > > After filling the Excel, he can click a send button at the bottom
    frame.
    > > By
    > > > clicking the button i have to save the file in a shared directory on
    the
    > > web
    > > > server by a unique name.
    > > >
    > > > Is it possible ?
    > > >
    > > > Any tips of how to do this ?
    > > >
    > > >
    > > >
    > > >
    > > >
    > > >
    > >
    > >
    >
    >

    SPA Guest

Similar Threads

  1. saving search results in dreamweaver to text or excel
    By manormi in forum Macromedia Exchange Dreamweaver Extensions
    Replies: 0
    Last Post: May 31st, 12:29 AM
  2. Excel annoyance - why quotes around some data when saving as tab-delimited text?
    By yvan@ideasdesign.com in forum Macromedia ColdFusion
    Replies: 0
    Last Post: March 8th, 02:56 PM
  3. Problem in launching and saving Excel file via ASP.NET
    By Venkatachalam in forum ASP.NET Security
    Replies: 0
    Last Post: December 21st, 06:13 PM
  4. Saving word doents in web site
    By Chris Baldwin in forum ASP Components
    Replies: 0
    Last Post: September 18th, 02:11 PM
  5. Saving a file as excel
    By jawahar rajan in forum ASP
    Replies: 3
    Last Post: August 11th, 11:48 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139