Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
PivotTableWizard help with VB | Excel Worksheet Functions | |||
different between CreatePivotTable and PivotTableWizard | Excel Programming | |||
Track Changes using Csharp | Excel Programming | |||
Get OLEObject.Object with Csharp | Excel Programming | |||
Get OLEObject with CSharp | Excel Programming |