Help,
I have been successfully creating Excel spreadsheets via SQL for months. I get a new laptop with Vista and it stops working.
I can create the Excel application, I can add a workbook, but I CANNOT add a worksheet to the workbook.
I suspect that some Vista security is requesting that I confirm wanting to add a worksheet, so everything just hangs. Anyhelp would be much appreciated. Code snippet below.
Stephen
--Create Excel application
EXEC
@HR = sp_OACreate 'Excel.Application', @objExcel OUT
--create a workbook
EXEC
@HR = sp_OAGetProperty @objExcel, 'WorkBooks.Add', @objWorkBook OUT
--add a worksheet
EXEC
@HR = sp_OAGetProperty @objWorkBook, 'WorkSheets.Add', @objWorkSheet OUT