This project has moved. For the latest updates, please go here.

Problem with using ROUND in a formula.

Jun 10, 2015 at 3:19 PM
Hi,

In one project I'm creating a total value with the following code:

ws.Cells[row,8].Formula = string.Format("{0}{1}{2}", new ExcelAddress(row,5,row,5), new ExcelAddress(row,6,row,6), new ExcelAddress(row,7,row,7));

Now I wanted to round the result to 2 decimals and changed the template to:

string.Format("ROUND({0}{1}{2};2)"....

But when I open the resulting Excel file with Excel, it throws an error message...
Developer
Jun 12, 2015 at 7:31 PM
Hi, use comma instead of semicolon.
Marked as answer by ThomasBraun66 on 7/6/2015 at 5:08 AM
Jul 6, 2015 at 12:08 PM
swmal wrote:
Hi, use comma instead of semicolon.
Works like a charm... thank you very much!