specific name for saving.

A

Asha

greetings, i'm using active x to create an excel object and it works fine. sweet. the next portion is to specify name for it. i would like to have a default name in the save dialog box when the user click on the save button. besides having is like "book1.xls" i would like it to call "myspecific name.xls". can someone show me the codes? attach below are my codes for it.

*** begin ***
<SCRIPT language="vbscript">

Sub btnClientExport_onclick

Dim sHTML

sHTML = document.all.item("dgDS2Excel").outerhtml

Dim oXL, oBook

Set oXL = CreateObject("Excel.Application")

Set oBook = oXL.Workbooks.Add

oBook.HTMLProject.HTMLProjectItems("Sheet1").Text = sHTML

'oXL.SaveAs "C:\something"

oBook.HTMLProject.RefreshDocument

oXL.Visible = true

oXL.UserControl = true


End Sub

</SCRIPT>

*** end ***


thanks in advance for the reply.


asha...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top