We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Table : Convert to range + set subtotal

Hi !

I use v Aspose Cells.

Because table don’t permit subtotal, I want:
1 / Convert a table to range like that:

2/ In this range, add subtotal, like that:

What is the best way ?



1) See the sample code to remove Table’s filters to become normal range of cells as per your needs.

Sample code: (The template file has a table/list object in the first worksheet)

Workbook workbook = new Workbook(“e:\test2\BookTable.xlsx”);
//Get the first table/list object.
ListObject listObject = workbook.Worksheets[0].ListObjects[0];
//Set the AutoFilters Off to make it normal.
listObject.AutoFilter.Range = null;

2) See the document on how to add subtotals:

Thank you.

Thanks, It’s perfect !

Now i have a “little problem”, i wish have a label in french “Total Général” instead of "Grand Total"

I use Excel 2010 French, and i try :
Aspose.Cells.LoadOptions lo = new Aspose.Cells.LoadOptions();

lo.Region = CountryCode.France;

lo.LanguageCode = CountryCode.France;

m_designer.Workbook.Settings.Region = CountryCode.France;
m_designer.Workbook.Settings.LanguageCode = CountryCode.France;

System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo(“fr-FR”);

m_designer.Workbook.Settings.CultureInfo = ci;

but it doesn’t work


I am afraid this may not be possible by default, although you may try to insert the french text manually in the relevant cells. Aspose.Cells by default follows US - English Excel’s standards and language settings. Also, if you need to set formulas, you have to consider English Language.

Thank you.

OK, thank you for your response.
So it is not possible, the best solution is to replace the text