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

Hi There,

I am struggle with .set_SubTotals using C#:

I tried:

object[] noSub = { false, false, false, false, false, false, false, false, false, false, false, false };

Excel.PivotTable pt = XlApp.ActiveSheet.PivotTable("Test");
pt.PivotFields("Datestamp").set_Subtotals(Type.Mis sing, noSub);

and
pt.PivotFields("Datestamp").set_Subtotals(noSub, Type.Missing);

and

for (int index = 1; index <= 12; index++)
{
pt.PivotFields("Test").set_Subtotals(index, false);
}

In all three cases, the error message popped up and saying "'System.__ComObject' does not contain a definition for 'set_Subtotals'".

I am new to Excel programing and appreciate your help.

Hugh
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Using C# .setSubtotals

More info:

If "Subtotals" instead of "set_Subtotals" is used, the error message is "Erroe while invoking Subtotals".

Your help is very much appreciated.
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



All times are GMT +1. The time now is 09:37 AM.

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

About Us

"It's about Microsoft Excel"