Thanks for your response.
I am using v7.4.3.5.
I did try with your code but i am not getting any results.
i did not use v7.5.0, before using that version I want you to please check my code and sheet.
I have attached the sample excel file
.In first tab, i got the result from my code.
In the second tab, my requirement is there.
Please see the below code and attached sample.
sheet.Cells["F1"].PutValue("Store");
sheet.Cells["F2"].PutValue("bStore");
sheet.Cells["F3"].PutValue("AStore");
sheet.Cells["F4"].PutValue("bStore");
sheet.Cells["F5"].PutValue("AStore");
sheet.Cells["F6"].PutValue("AStore");
sheet.Cells["G1"].PutValue("GAme");
sheet.Cells["G2"].PutValue("Golf");
sheet.Cells["G3"].PutValue("Tennis");
sheet.Cells["G4"].PutValue("Golf");
sheet.Cells["G5"].PutValue("Tennis");
sheet.Cells["G6"].PutValue("Football");
sheet.Cells["H1"].PutValue("Day");
sheet.Cells["H2"].PutValue("Day1");
sheet.Cells["H3"].PutValue("DAy2");
sheet.Cells["H4"].PutValue("day3");
sheet.Cells["H5"].PutValue("day4");
sheet.Cells["H6"].PutValue("day4");
sheet.Cells["I1"].PutValue("Sales");
sheet.Cells["I2"].PutValue(5);
sheet.Cells["I3"].PutValue(20);
sheet.Cells["I4"].PutValue(10);
sheet.Cells["I5"].PutValue(5);
sheet.Cells["I6"].PutValue(15);
PivotTableCollection pcs = sheet.PivotTables;
int idx = pcs.Add("=F1:I6", "J10", "Ptable1");
PivotTable pt = pcs[idx];
pt.AddFieldToArea(PivotFieldType.Row, 1);
pt.AddFieldToArea(PivotFieldType.Column, 2);
pt.AddFieldToArea(PivotFieldType.Data, 3);
pt.AddFieldToArea(PivotFieldType.Page, 0);
pt.PageFields[0].IsMultipleItemSelectionAllowed = true;
pt.RowGrand = true;
pt.AddCalculatedField("Calculated", "='Sales'/2" );
//pt.AddFieldToArea(PivotFieldType.Column, 4);
pt.BaseFields[4].DragToRow = false;
pt.BaseFields[4].DragToData = false;
pt.BaseFields[4].DragToColumn = true;sheet.Cells["F1"].PutValue("Store");
sheet.Cells["F2"].PutValue("bStore");
sheet.Cells["F3"].PutValue("AStore");
sheet.Cells["F4"].PutValue("bStore");
sheet.Cells["F5"].PutValue("AStore");
sheet.Cells["F6"].PutValue("AStore");
sheet.Cells["G1"].PutValue("GAme");
sheet.Cells["G2"].PutValue("Golf");
sheet.Cells["G3"].PutValue("Tennis");
sheet.Cells["G4"].PutValue("Golf");
sheet.Cells["G5"].PutValue("Tennis");
sheet.Cells["G6"].PutValue("Football");
sheet.Cells["H1"].PutValue("Day");
sheet.Cells["H2"].PutValue("Day1");
sheet.Cells["H3"].PutValue("DAy2");
sheet.Cells["H4"].PutValue("day3");
sheet.Cells["H5"].PutValue("day4");
sheet.Cells["H6"].PutValue("day4");
sheet.Cells["I1"].PutValue("Sales");
sheet.Cells["I2"].PutValue(5);
sheet.Cells["I3"].PutValue(20);
sheet.Cells["I4"].PutValue(10);
sheet.Cells["I5"].PutValue(5);
sheet.Cells["I6"].PutValue(15);
PivotTableCollection pcs = sheet.PivotTables;
int idx = pcs.Add("=F1:I6", "J10", "Ptable1");
PivotTable pt = pcs[idx];
pt.AddFieldToArea(PivotFieldType.Row, 1);
pt.AddFieldToArea(PivotFieldType.Column, 2);
pt.AddFieldToArea(PivotFieldType.Data, 3);
pt.AddFieldToArea(PivotFieldType.Page, 0);
pt.PageFields[0].IsMultipleItemSelectionAllowed = true;
pt.RowGrand = true;
pt.AddCalculatedField("Calculated", "='Sales'/2" );
//pt.AddFieldToArea(PivotFieldType.Column, 4);
pt.BaseFields[4].DragToRow = false;
pt.BaseFields[4].DragToData = false;
pt.BaseFields[4].DragToColumn = true;
Please provide the solution for this.
Thanks in advance