writing on an existing excel sheet (template) through ASP

  • Thread starter Thread starter Deepali
  • Start date Start date
D

Deepali

hi all,

I want to write in an existing excel sheet which is on
server side. its a template..
and has a standard format.. so i want to write in that
excel sheet in a paricualr
fields and then open that file to save on the client
side.. can i do that?..
i visited many pages/sites.. but all that they are doing
is.. creating a new excel
sheet,writing on it and then user can save it on his/her
side.. but i want to
use a template that is already existing.
please help .......
Thanx in advance..
Deepali
 
Deepali said:
hi all,

I want to write in an existing excel sheet which is on
server side. its a template..
and has a standard format.. so i want to write in that
excel sheet in a paricualr
fields and then open that file to save on the client
side.. can i do that?..
i visited many pages/sites.. but all that they are doing
is.. creating a new excel
sheet,writing on it and then user can save it on his/her
side.. but i want to
use a template that is already existing.
please help .......
Thanx in advance..
Deepali

Hi Can't you just use the Macro Recorder to get you started?

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 13/10/2003 by GB
'

' Open existing workbook
Workbooks.Open FileName:="J:\My Documents\Mycalcs.xls"

'Put some data in
Range("C7").Select
ActiveCell.FormulaR1C1 = "1234"

'Save it elsewhere - some of the options can be omitted, but this works
ActiveWorkbook.SaveAs FileName:="C:\rubbish.xls", FileFormat:=xlNormal,
_
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False

End Sub



Or are you saying that you want to open a new workbook using a particular
template (xlt) file?

Again Macro Recorder will get you started:

Workbooks.Add(Template:= "C:\Program Files\Microsoft
Office\Templates\Spreadsheet Solutions\INVOICE.XLT")

Use that instead of the workbooks.open line above

I hope that helps.

Geoff
 
Back
Top