InsertRow Doesn't Copy Table Formulas

I have an Excel spreadsheet that uses Tables (create cell headers, then in the first row below the headers select Insert -> Table). Two of the cells in the table’s rows use formulas. In Excel, when I insert a row in the table, the formulas get copied to the new cells. However, when I use Aspose.Cells and call InsertRow() or InsertRows(), the new cells do NOT have the formulas.


I’ve attached the spreadsheet I’ve used for testing. I’m trying to insert a row after row 11 (between rows 11 and 12).

Thanks,

Dave Frogley

Hi,


Thanks for the template file.

I can notice the issue as you have mentioned. The formulas in the table cells e.g D12 and E12 are not updated accordingly when we insert a row b/w 11 and 12.

E.g
Sample code:
Workbook workbook = new Workbook(@“e:\test2\BudgetExportTemplate+AlmostFinal.xlsx”);
Worksheet worksheet = workbook.Worksheets[0];
worksheet.Cells.InsertRows(11,1,true);
workbook.Save(“e:\test2\output_file.xlsx”);

I have logged a ticket with an id “CELLSNET-41684” for your issue. We will look into your issue soon.

Once we have any update on it, we will let you know here.

Thank you.

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

We have fixed the issue.

Please download and try this fix: Aspose.Cells for .NET v7.4.3.3 and let us know your feedback.

Thank you for providing the hotfix–it did fix the formula copying for the added row(s). However, one of the cells in the new row is missing its left and right borders. See the attached screenshot.

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

We were unable to replicate this issue using the following code with the latest version: Aspose.Cells
for .NET v7.4.3.3
.

We have attached the output file for your reference. If you still find an issue, please provide us your sample code, input and output files to look into this issue.

C#


string filePath = @“F:\Shak-Data-RW\Downloads\BudgetExportTemplate+AlmostFinal.xlsx”;


Workbook workbook = new Workbook(filePath);

Worksheet worksheet = workbook.Worksheets[0];

worksheet.Cells.InsertRows(11, 1, true);

workbook.Save(filePath + “.out.xlsx”);


I am still seeing the issue. I’m attaching a toy project I put together that exhibits this problem as well as the output document it generates.

Hi,

Thanks for your posting and using Aspose.Cells.

We were able to replicate this issue using the previous code. Borders break at row 12 cells. We have attached the screenshot for a reference.

We have logged this issue in our database. We will look into it and resolve this issue. Once the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as CELLSNET-41706.

C#


string filePath = @“F:\Shak-Data-RW\Downloads\BudgetExportTemplate+AlmostFinal.xlsx”;


Workbook workbook = new Workbook(filePath);

Worksheet worksheet = workbook.Worksheets[0];

worksheet.Cells.InsertRows(11, 1, true);

workbook.Save(filePath + “.out.xlsx”);




Hi,

Thanks for your posting and using Aspose.Cells for .NET.

We have fixed the issue.

Please download and try this fix: Aspose.Cells for .NET v7.4.3.4 and let us know your feedback.

The issues you have found earlier (filed as CELLSNET-41684;CELLSNET-41706) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.