Excel report

Hi All, I want to save an excel report in a file local to system(say c:\myfile) using an LS agent.

I am using the following code:

Sets the download to use Excel

Print |Content-Type:application/vnd.ms-excel| 

'Triggers the save/open prompt instead of embedding the spreadsheet in the browser

Print |Content-Disposition:Attachment; filename="WeeklyTS by Name.xls"|

This works fine, however the problem is that i dont want the prompt to come up and ask me for saving the file rather it should automatically save the file locallyor at the defined location.

Thanks in advance.

Subject: Excel report

Browser security will not allow direct access to the local file system. (You CAN do it with a signed ActiveX control in Internet Explorer if your server is in a trusted location and you have administrative control over the browser to force trust. That’s a Microsoft issue, though, so go to a MS source for more info.)

Subject: RE: Excel report

Thanks Stan!However I want to write a scheduled agent which should save the excel file locally on my system.

Subject: RE: Excel report

Then you’ll need to run the code locally and use the Excel COM/OLE classes.