473,226 Members | 1,531 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,226 software developers and data experts.

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 ?


Jul 19 '05 #1
3 12346
SPA
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" <gw*******@hotmail.com> wrote in message
news:eF**************@TK2MSFTNGP11.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 ?


Jul 19 '05 #2
SPA
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.
http://msdn.microsoft.com/library/de...celobjects.asp

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" <gw*******@hotmail.com> wrote in message news:OH**************@TK2MSFTNGP12.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" <sh***********@usswi.com> a écrit dans le message de
news:Ow*************@TK2MSFTNGP12.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" <gw*******@hotmail.com> wrote in message
news:eF**************@TK2MSFTNGP11.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 ?






Jul 19 '05 #3
SPA
You could also use the following link for reference:

http://www.serverwatch.com/tutorials...le.php/1493331

http://www.microsoft.com/OfficeDev/A...PG/004/004.htm

http://www.intranetjournal.com/artic...02_25_00b.html
"Vikram" <gw*******@hotmail.com> wrote in message
news:OH**************@TK2MSFTNGP12.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" <sh***********@usswi.com> a écrit dans le message de
news:Ow*************@TK2MSFTNGP12.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" <gw*******@hotmail.com> wrote in message
news:eF**************@TK2MSFTNGP11.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 ?




Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Helmut Blass | last post by:
hi Access-freaks, in MS Access, I generate an Excel file where the user should have the possibility to determine the excel file name by file dialog. so I use the following command: ...
0
by: dd | last post by:
I am kind of puzzled with this problem. I am trying to open an xls file from C# and then save it as text or comma delimited. Here is the code: Excel.ApplicationClass oExcelApp = new...
0
by: mathieu cupryk | last post by:
in the Button1_Click I need to make the 1st column saved as readonly. How can I do this? using System; using System.Collections; using System.ComponentModel; using System.Data; using...
1
by: Bernard O'Flynn | last post by:
Hi I have a pivot table that gets it data from another worksheet in the workbook. I need to update the data worksheet from data in a database (I'm using MS Data Application Block) and get a...
1
by: Mark | last post by:
Hello - I'm opening/saving an Excel workbook from ASP.Net. When I try to save the workbook I get the error: System.Runtime.InteropServices.COMException: The remote procedure call failed. ...
0
by: Speilman_54 | last post by:
Hi, I'm converting an excel Macro into visual basic 2005 express, as I don't have a copy of VB 6 and trying to make and executable from it, I know this version doesn't have the save file as .exe,...
6
by: Karl | last post by:
Hi all, It may seem like a rather odd request (or not) but I would like to be able to create a file (doc, jpg, xls or one of many other files that can be automated) on a website and stream it to...
0
by: veer | last post by:
hello expert i am facing a probleum of saving the out put in excel sheet actually i have two buttons on my vb form i,e merge entery and merge verify and when i execute my program one by one...
6
by: Eddie | last post by:
Hi all, I am displaying a number of reports, and giving the users an option to display them on the web or download them to Excel. If they want the Excel file, I just use the PHP header command...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.