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

Free Support Forum - aspose.com

The SubTotal Formula Persist after Merge Process

Hi !

I have a model with subtotals table (see attachments),
I merge my documents :
Aspose.Cells.WorkbookDesigner designer = new Aspose.Cells.WorkbookDesigner();
designer.Workbook = new Aspose.Cells.Workbook(templatePath);
designer.SetDataSource(myDataSet);
designer.Process(); // test with true or false argument

when my table of mydataset is empty, the smart makers formula remains !

Is it possible to delete automatically this smart makers on merge ?

thanks

Hi,


I have tested the scenario a bit with v7.1.1.6 (Please download: Aspose.Cells for .NET v7.1.1.6), it works fine. If the source DataTable is empty, it will not display the markers. Please make sure that you have put “false” for the parameter in the method, i.e.
designer.Process(false);

If yous still find the issue, kindly do create a sample console application, zip it and post it here with the sample files, we will check it soon.

Thank you.

Indeed,
With the last version the content of Subtotal formula is removed,
However, I am forced to use specific version 7.0.1.0 and the Subotal formula is not delete !


I use this function
to remove the remaining formula “&=”
public static void DeleteRowWhenCellStartWith(Workbook wb, string startWith)
{
Cell findCell;
foreach (Worksheet ws in wb.Worksheets)
while (true)
{
findCell = ws.Cells.FindStringStartsWith(startWith, null);
if (findCell != null)
ws.Cells.DeleteRow(findCell.Row);
else break;
}
}


Thanks

Hi,


Well, we recommend you to use latest version as it work fine according to your needs. But since you cannot use the latest version, so I think you are doing right to manually delete those Subtotal markers accordingly.

Have a good day!