Spire.DataExport for .NET is a 100% pure data .NET library suit for exporting data into MS Word, Excel, RTF, Access, PDF, XPS, HTML, XML, Text, CSV, DBF, SYLK, SQL Script, DIF, Clipboard, etc.

Wed Nov 26, 2014 10:30 pm

How do you apply grand totals to certain columns of data that's been exported

ascotford
 
Posts: 12
Joined: Wed Sep 18, 2013 3:34 pm

Thu Nov 27, 2014 7:31 am

Dear ascotford,

Thanks for your inquiry.

Sorry that Spire.Xls doesn't support this feature . We have added it as new feature into our schedule and when it is finished, we will inform you immediately.

Also there is a simple way to do Grand Totals by using formula, you can refer to the code below:
Code: Select all
sheet.Range["C6"].Formula = "=SUBTOTAL(109,C2:C5)";

Best Regards,
Burning
E-iceblue Support Team
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Wed Nov 18, 2020 10:18 am

Hello,

Sorry for the long silence.
Glad to inform you that we just released Spire.XLS Pack(Hotfix) Version:10.11.7 that supports the Subtotal functionality. Welcome to download it from the following links.
Website link: https://www.e-iceblue.com/Download/down ... t-now.html
Nuget link: https://www.nuget.org/packages/Spire.XLS/10.11.7

Code example:
Code: Select all
Workbook workbook = new Workbook();
workbook.LoadFromFile(input);
Worksheet sheet = workbook.Worksheets[0];
CellRange range = sheet.Range["A5:D20"];
sheet.Subtotal(range, 0, cols.ToArray(), SubtotalTypes.Sum, true, false, true);
workbook.SaveToFile(output,FileFormat.Version2013);


Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1494
Joined: Tue Jul 09, 2019 2:22 am

Return to Spire.DataExport