Showing posts with label createobject. Show all posts
Showing posts with label createobject. 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:
>

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!!
>
>|||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...
> 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!!
>>

activex error and dts

I am tying to run this DTS:
the job has an activex part which uses :
"Set fso = CreateObject("Scripting.FileSystemObject")"
this row gives me the following error:
"ActiveX Scripting encountered a Run Time Error during the execution of the script. "
the dts worked when I run it local on my station but when I try running it on the server this error comes
can u help?
10xSound like permission problem.
http://support.microsoft.com/kb/298725