Showing posts with label codeset. Show all posts
Showing posts with label codeset. Show all posts

Sunday, March 25, 2012

ActiveX from SQL?

Hello,
I'm trying to use ActiveX from SQL to save an Excel file. I use the
following code:
Set xlApp = CreateObject("Excel.Application") Set xlWb =
xlApp.Workbooks.Open("C:\Report.xls")
' make some changes here to the file ...
xlWb.Save
Since the file already exist and I am making changes to it, the 'Save'
command will trigger a prompt and I have to answer 'yes' to the Excel
question 'File already exists. Do you want to replace this file?'
Does the Save command or another command accept a parameter so it will
overwrite the file without the prompt?
THANKS!!it does not overwrite the file without the prompt.
Because It occur security web browser.
cheers...
"Dean J Garrett" wrote:

> Hello,
>
> I'm trying to use ActiveX from SQL to save an Excel file. I use the
> following code:
> Set xlApp = CreateObject("Excel.Application") Set xlWb =
> xlApp.Workbooks.Open("C:\Report.xls")
> ' make some changes here to the file ...
> xlWb.Save
> Since the file already exist and I am making changes to it, the 'Save'
> command will trigger a prompt and I have to answer 'yes' to the Excel
> question 'File already exists. Do you want to replace this file?'
> Does the Save command or another command accept a parameter so it will
> overwrite the file without the prompt?
>
> THANKS!!
>
>|||it does not overwrite the file without the prompt.
Because It occur security web browser.
cheers...
"Dean J Garrett" wrote:

> Hello,
>
> I'm trying to use ActiveX from SQL to save an Excel file. I use the
> following code:
> Set xlApp = CreateObject("Excel.Application") Set xlWb =
> xlApp.Workbooks.Open("C:\Report.xls")
> ' make some changes here to the file ...
> xlWb.Save
> Since the file already exist and I am making changes to it, the 'Save'
> command will trigger a prompt and I have to answer 'yes' to the Excel
> question 'File already exists. Do you want to replace this file?'
> Does the Save command or another command accept a parameter so it will
> overwrite the file without the prompt?
>
> THANKS!!
>
>|||Yes, we understand why it is doing it, but the question is: how can we get
around this problem. We just wanted to automatically over-write the file.
Any clues?
"jongwoo" <jongwoo@.discussions.microsoft.com> wrote in message
news:EFE9CE78-0B81-4A79-8669-F6B6B605F7B1@.microsoft.com...[vbcol=seagreen]
> it does not overwrite the file without the prompt.
> Because It occur security web browser.
> cheers...
> "Dean J Garrett" wrote:
>|||Yes, we understand why it is doing it, but the question is: how can we get
around this problem. We just wanted to automatically over-write the file.
Any clues?
"jongwoo" <jongwoo@.discussions.microsoft.com> wrote in message
news:EFE9CE78-0B81-4A79-8669-F6B6B605F7B1@.microsoft.com...[vbcol=seagreen]
> it does not overwrite the file without the prompt.
> Because It occur security web browser.
> cheers...
> "Dean J Garrett" wrote:
>