Sum of each row.

R

Rasheed

Hi All,

i have created one xls file and i have the data like below

A B C D
1 100 20 30
2 101 20 31
3 102 20 35
4 103 20 35
5 104 20 32



I need to do subtotal of each row. please help me out how to do.

result will be like below

-------------------------------------------------------------
GrandTotal 510 100 163
-------------------------------------------------------------


oWSheet.get_Range("A1" , "D5" )).Subtotal(1,

Excel.XlConsolidationFunction.xlSum,

Type.Missing,

(object)true,

(object)true,

Excel.XlSummaryRow.xlSummaryBelow);
i am using the above function but it gives only one row total only.
but i want 3 rows sum individually.

thanks in advance.

regards
Rasheed
 
J

Jeff Johnson

i have created one xls file and i have the data like below

A B C D
1 100 20 30
2 101 20 31
3 102 20 35
4 103 20 35
5 104 20 32



I need to do subtotal of each row. please help me out how to do.

I recommend asking in microsoft.public.excel.programming. The answer you get
back will probably be in VB, but the important part will be that you'll see
the proper method calls that need to be made so you should be able to figure
out how to do it in C#.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top