Free Support Forum -

CopyRow Formula Problem

Sorry for the bad code but this is the only way I can simulate this problem at the moment.
I am sure there is a more straigt forward way of showing this but this example does show the problem.

After my .CopyRow command, I am saving the workbook by creating another instance first and copying the existing workbook.
The file that is saved has a forumla problem.

The formula in cell "A18" should be reading:
=CONCATENATE("MA: ",M17," ",N17," Tier:",Q17)

Instead, it is reading the orginal row numbers like this:
=CONCATENATE("MA: ",M9," ",N9," Tier:",Q9)

Here is a code sample and attached is an excel file I am using as a template.
I am using version
This worked correctly in version

Workbook excelWorkbook0 = new Workbook();

Workbook excelWorkbook2 = new Workbook();
int intWS = excelWorkbook2.Worksheets.Add();
Worksheet ws2 = excelWorkbook2.Worksheets[intWS];

Workbook excelWorkbook1 = new Workbook();
Worksheet ws1 = excelWorkbook1.Worksheets[0];


ws2.Cells.CopyRow(ws1.Cells, 9, 17);

Workbook excelWorkbook3 = new Workbook();
excelWorkbook3.Save(@"C:\Final.xls", FileFormatType.Default);

Please try this attached fix.

Thank you!

This problem has been corrected.