|
|
SQL Server Excel Workbench
Last post 11-18-2011, 3:11 AM by swapnajeet. 131 replies.
-
02-14-2007, 1:05 AM |
|
|
Good work done by Robyn and excellent. She looks beautiful.
|
|
-
-
02-14-2007, 10:54 AM |
|
|
SQL Server Excel Workbench
Brilliant. I had done this kind of work previously using DTS but this approach makes it more portable and more reusable. I may even convert my old routines to use this method. If either of you (or both) are considering a DBA job in Canada let me know. Seriously, this caliber of work is worth a job offer. (In your case Phil I'd need your real name ... eventually)
|
|
-
02-14-2007, 10:56 AM |
-
fhanlon
-
-
-
Joined on 09-21-2006
-
Winnipeg, Manitoba Canada
-
-
-
|
SQL Server Excel Workbench
My last post came out as Anonymous which I am not (always)
|
|
-
-
02-15-2007, 3:10 AM |
|
|
Re: SQL Server Excel Workbench
Ma'm Robyn, you made mention about 'an ADODB version is very simple to do and can be made much faster for reads and writes'. Do you mean an excel workbench adodb version? If so, please write a sql server excel workbench using an ADODB. Thank you.
|
|
-
02-17-2007, 11:53 AM |
-
02-20-2007, 10:58 PM |
|
|
SQL Server Excel Workbench
Hi,
Thanks for your artical on this subject
I want to know more about scripting for SQL Server 2000.
|
|
-
02-23-2007, 4:35 PM |
|
|
SQL Server Excel Workbench
Thanks, some great ideas.
But spExecute_ADODB_SQL fails if you loop more than 64 times.
It needs a needs an extra step: exec @hr = sp_OAMethod @objConnection, 'Close'
|
|
-
02-23-2007, 5:05 PM |
|
|
SQL Server Excel Workbench
Thanks, some great ideas.
But spExecute_ADODB_SQL fails if you loop more than 64 times.
It needs a needs an extra step: exec @hr = sp_OAMethod @objConnection, 'Close'
|
|
-
-
03-19-2007, 1:22 AM |
|
|
SQL Server Excel Workbench
Thanks, Robyn & Phil, for an article that was both informative and useful, especially to people like me who were not trained as DBAs but drifted into using SQL as part of their job.
I would have posted this earlier but I was too busy adapting bits of your C.R.U.D for my own work.
|
|
-
03-26-2007, 8:48 AM |
|
|
Thank you for this magnificent script.
I used the script for my reports and discovered, that if you change some small thing in the script you can actually reuse 1 file for many worksheets.
This is the code that I Used to be able to append or create a new workbook using your code startin with a few lines of your code first.
--so now we have the queryresults. We start up Excel IF @hr=0 SELECT @strErrorMessage='Creating the Excel Application, on ' +@SourceServer, @objErrorObject=@objExcel IF @hr=0 EXEC @hr=sp_OACreate 'Excel.Application', @objExcel OUT IF @hr=0 SELECT @strErrorMessage='Getting the WorkBooks object ' IF @hr=0 EXEC @hr=sp_OAGetProperty @objExcel, 'WorkBooks', @objWorkBooks OUT
IF @hr=0 EXEC @hr = sp_OASetProperty @objExcel, 'DisplayAlerts', 'FALSE' --create a workbook or append a workbook DECLARE @status int EXEC master..xp_fileexist @filename, @Status OUTPUT
IF @status = 1 BEGIN SELECT @strErrorMessage='Opening a workbook ', @objErrorObject=@objWorkBooks IF @hr=0 SELECT @strErrorMessage='Opening the workbook as "'+@filename+'"', @objErrorObject=@objRange, @command = 'Open("' + @filename + '")' IF @hr=0 EXEC @hr=sp_OAGetProperty @objWorkBooks, @command, @objWorkBook OUT END ELSE BEGIN IF @hr=0 SELECT @strErrorMessage='Adding a workbook ', @objErrorObject=@objWorkBooks IF @hr=0 EXEC @hr=sp_OAGetProperty @objWorkBooks, 'Add', @objWorkBook OUT END
Hope it helps someone.
Regards, Denis
|
|
-
03-27-2007, 8:14 AM |
-
03-29-2007, 11:13 AM |
|
|
Hi Robyn and Phil, Some great scripts, nice to see several different solutions presented to a particular challenge.
One question about the ADO script, you replace in @DDL the stub %worksheet with the worksheet name passed in the @worksheet parameter, but please can you give an example of how it is used?
Cheers
David
|
|
Page 2 of 9 (132 items)
2 ...
|
|