$ (dollar signs) in formulas


#1

Using Cells for .Net

Our massive designer file has many formulas with $ signs in them. Excel apparently accepts it with or without. Here’s an example of one that has it both ways in one formula: =DK66DK$188DK$51. When we call Workbook.CalculateFormula, cells with these formulas don’t calculate right. In the cases I’ve checked it always comes out as zero for the calculated value. Is this a known limitation or a bug?

- Dana


#2

Have you tried v4.0.2? I used the following test code and it worked fine.

Workbook workbook = new Workbook();
Cells cells = workbook.Worksheets[0].Cells;
cells["A1"].Formula = "=DK66*DK$188*DK$51";
cells["DK66"].PutValue(10);
cells["DK188"].PutValue(2.5);
cells["DK51"].PutValue(3);

workbook.CalculateFormula();

Console.WriteLine(cells["A1"].Value);