Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default PivotTableWizard Using Csharp

Hi,
I am trying to create a PivotTable which has an OLAP as a data source, but I
didn't survive with this.
Here is my try:
string path = @"c:\Book1.xls";
string connectionStr = "Provider=MSOLAP.3;Cache
Authentication=False;Integrated Security=SSPI;Persist Security Info=True;Data
Source=NB_AA;Impersonation Level=Impersonate;Mode=ReadWrite;Protection
Level=Pkt Privacy;Auto Synch Period=20000;Default Isolation Mode=0;Default
MDX Visual Mode=0;MDX Compatibility=0;MDX Unique Name Style=0;Non Empty
Threshold=0;SQLQueryMode=Calculated;Safety Options=1;Secured Cell Value=0;SQL
Compatibility=0;Compression Level=0;Real Time Olap=False;Packet
Size=4096;Initial Catalog=OLAPDB";
excel = new Microsoft.Office.Interop.Excel.ApplicationClass();
workBook =
(ExcelInterop.WorkbookClass)excel.Workbooks.Open(p ath, 0, true, 5, "", "",
true, ExcelInterop.XlPlatform.xlWindows, "\t", false, false, 0, true, 1, 0);
sheets = workBook.Worksheets;
worksheet = (ExcelInterop.Worksheet)sheets.get_Item(1);
ExcelInterop.Range range = worksheet.get_Range("A1", "X300");
ExcelInterop.PivotTable table =
worksheet.PivotTableWizard(ExcelInterop.XlPivotTab leSourceType.xlDatabase,
null, range, "PivotTable1", false, false, true, false, null, null, false,
false, ExcelInterop.XlOrder.xlDownThenOver, null, null, connectionStr);

Any help?

thank you in advance ....
regards,
Arghad Arnaout
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default PivotTableWizard Using Csharp

Or maybe somebody knows how to use the method:

Microsoft.Office.Interop.Excel.WorksheetClass.Pivo tTableWizard();

thank you.

Arghad

"Arghad Arnaout" wrote:

Hi,
I am trying to create a PivotTable which has an OLAP as a data source, but I
didn't survive with this.
Here is my try:
string path = @"c:\Book1.xls";
string connectionStr = "Provider=MSOLAP.3;Cache
Authentication=False;Integrated Security=SSPI;Persist Security Info=True;Data
Source=NB_AA;Impersonation Level=Impersonate;Mode=ReadWrite;Protection
Level=Pkt Privacy;Auto Synch Period=20000;Default Isolation Mode=0;Default
MDX Visual Mode=0;MDX Compatibility=0;MDX Unique Name Style=0;Non Empty
Threshold=0;SQLQueryMode=Calculated;Safety Options=1;Secured Cell Value=0;SQL
Compatibility=0;Compression Level=0;Real Time Olap=False;Packet
Size=4096;Initial Catalog=OLAPDB";
excel = new Microsoft.Office.Interop.Excel.ApplicationClass();
workBook =
(ExcelInterop.WorkbookClass)excel.Workbooks.Open(p ath, 0, true, 5, "", "",
true, ExcelInterop.XlPlatform.xlWindows, "\t", false, false, 0, true, 1, 0);
sheets = workBook.Worksheets;
worksheet = (ExcelInterop.Worksheet)sheets.get_Item(1);
ExcelInterop.Range range = worksheet.get_Range("A1", "X300");
ExcelInterop.PivotTable table =
worksheet.PivotTableWizard(ExcelInterop.XlPivotTab leSourceType.xlDatabase,
null, range, "PivotTable1", false, false, true, false, null, null, false,
false, ExcelInterop.XlOrder.xlDownThenOver, null, null, connectionStr);

Any help?

thank you in advance ....
regards,
Arghad Arnaout

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
PivotTableWizard help with VB circuit_breaker Excel Worksheet Functions 1 July 7th 09 02:08 PM
different between CreatePivotTable and PivotTableWizard Kam Excel Programming 0 June 29th 06 08:00 AM
Track Changes using Csharp Rana Saha[_2_] Excel Programming 1 June 1st 06 07:50 PM
Get OLEObject.Object with Csharp Bragadiru Excel Programming 0 November 3rd 04 08:22 AM
Get OLEObject with CSharp Bragadiru Excel Programming 0 November 2nd 04 03:31 PM


All times are GMT +1. The time now is 02:53 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"