I tried thisbriefly and it doesn't work as intended
Infragistics.Excel.Workbook workbook = new Workbook(); workbook.Worksheets.Add("test"); Infragistics.Excel.Worksheet sheet = workbook.Worksheets[0]; sheet.Rows[0].Cells[0].Value = 5.05; sheet.Rows[1].Cells[0].Value = "=A1+1";
when I wxport it to excel, A2 shows =A1+1, and I have to go into the cell and press enter again for it to update to 6.05, and pressing F9 doesn't update the cell. How can I do this properly? Thank you
Hi,
you need to parse the formula like this (untested!):
Infragistics.Excel.Formula formula = Infragistics.Excel.Formula.Parse("=A1+1", Infragistics.Excel.CellReferenceMode.A1);
Infragistics.Excel.WorksheetRegion region = new Infragistics.Excel.WorksheetRegion(sheet, 2,2,2,2); // check the parameters, I'm not sure about those!
formula.ApplyTo(region);
Hope that helps!
H Andre, thank you, what build is this? I tried to find the Formula function in build 6.2 and 7.1 but can't find it. Thank you.
Support for adding formulas to workbooks was not added until version 7.2. That is when this class was added.
Thank you very much, iti s solved now.
I have a xll library that I can call in Excel, the name of the functions are like method_funcname(B2,B3,B4,B5,B6,B7,B8,B9,B10,B11,B12,B13,B14,B15,B16,B17) but the formula parser returns me an error
The formula has extra expressions after the end of it.Portion with error: (B2,B3,B4,B5,B6,B7,B8,B9,B10,B11,B12,B13,B14,B15,B16,B17)
is there a limit as to what the functions we can use? are we limited to Excel default functions? How can we use user defined functions from xll? Thank you
This is a bug. I would recommend submitting it to the support group: http://es.infragistics.com/gethelp.