Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
Programming
»
SMO/RMO/DMO
»
Refresh PivotTables in MS Excel 2007 with OLE...
Refresh PivotTables in MS Excel 2007 with OLE Automation
Rate Topic
Display Mode
Topic Options
Author
Message
sgovoni
sgovoni
Posted Thursday, May 06, 2010 4:03 PM
SSC Rookie
Group: General Forum Members
Last Login: Wednesday, August 29, 2012 5:09 PM
Points: 42,
Visits: 194
Hi,
I need to update a pivot table that resides on a Microsoft Excel worksheet.
I created a stored procedure dbo.USP_DMO_EXCEL_Pivot_RefreshTable(link:
http://www.ugiss.org/Content/Article/Aggiornare-una-tabella-pivot-di-Microsoft-Excel.aspx
) that uses OLE Automation (sp_OA*) to refresh, every night (without open the Excel file), the pivot table data in Microsoft Excel worksheet.
The stored procedure works well in this enviroment:
- OS Windows Server 2003
- Office 2003
- SQL Server 2008
The stored procedure does not work with:
- OS Windows Server 2008 64-bit or Windows 7 64-bit
- Office 2007
- SQL Server 2008 64-bit
The pivot table connecting to SQL Server with an ODBC connection (32 bit).
The Excel file will open correctly, bit I get an error during execution method "RefreshTable" in the following line of code:
Exec sp_OAMethod @objWorkSheet PivotTables('Pivot_Name').RefreshTable
The execution of stored procedures will not be completed, the only way (to stop it) is to interrupt forcefully the task "EXEC.EXE *32".
When I forced to close the task, in SSMS I get the following error:
-2146827284 Unable to find Microsoft Office Excel PivotTables property for the class Worksheet. C:\Program Files (x86)\Microsoft Office\Office12\1040\0 XLMAIN11.CHM
Message 50000, Level 16, State 1, Server <name> USP_DMO_Excel_Pivot_RefreshTable procedure, line 369
Whilst Error: Return object workbooks, Could not find property PivotTables for Class Worksheet
I also installed the 2007 Office System Driver: Data Connectivity Components (
http://www.microsoft.com/downloads/details.aspx?familyid=7554f536-8c28-4598-9b72-ef94e038c891&displaylang=en
) but without improvement.
Any suggestions?
Thanks a lot!
Post #917482
sgovoni
sgovoni
Posted Tuesday, June 01, 2010 4:43 PM
SSC Rookie
Group: General Forum Members
Last Login: Wednesday, August 29, 2012 5:09 PM
Points: 42,
Visits: 194
I am finally able to update a PivotTable test that resides on a Microsoft Excel worksheet.
The last test I've run on a PC with Windows 7 Professional x64 x64 SS2008 and Excel 2007.
After install the updated Office 2007 Data Connectivity Components
http://www.microsoft.com/downloads/details.aspx?familyid=7554F536-8C28-4598-9B72-EF94E038C891&displaylang=en
I have recreated the PivotTable and test... but this time I checked, as a data source, type "Microsoft Office Data Connection" and not the ODBC 32-bit...
Read the complete thread (italian language) at this link:
http://community.ugiss.org/forums/t/2787.aspx
Thanks
Post #931022
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.