kiefer
November 28, 2007, 11:04am
1
Hello,
with this Code:
_Cells[_Rowcount, _ColumnEnd].Formula = "=SUMPRODUCT(D30:D152;1/(1-F30:F152);E30:E152)/SUMPRODUCT(D30:D152;1/(1-F30:F152))";
I've got the error:
Exception message: Error in Cell: D19-Invalid formula:"=SUMPRODUCT(D30:D152;1/(1-F30:F152);E30:E152)/SUMPRODUCT(D30:D152;1/(1-F30:F152))".
I have tried ths form in Excel and the it works fine
thanks
Christian
Hi,
Please replace ';' with ',' as we don't accept ';' in formulas.
Thank you.
kiefer
November 28, 2007, 12:10pm
3
thanks!
Now I get the form inti Excel wahout a fault, but in the cell in excel I found "#Value" (#Wert).
what shall I do
thanks
Hi,
Could you post your template file to show the issue with sumproduct formula.
Thank you.
kiefer
November 28, 2007, 1:26pm
6
My C#-Code was:
_Cells[_Rowcount, _ColumnEnd].Formula = "=SUMPRODUCT(D30:D152,1/(1-F30:F152),E30:E152)/SUMPRODUCT(D30:D152,1/(1-F30:F152))";
Please try this attached fix.
kiefer
November 29, 2007, 3:33am
8
thanks al lot!
Actualy now I'm very busy, I'll try it in 2-3 hours
kiefer
November 29, 2007, 8:03am
9
Now I've tried it.
I get also the error with "#Value" in the Cell with the formula:
=SUMPRODUCT(D30:D152,1/(1-F30:F152),E30:E152)/SUMPRODUCT(D30:D152,1/(1-F30:F152))
If I set the cursor into this cell I can see above in the editline the right formula, if I put the Cursor in the editline and enter return, then the formula will be caculated?
Any idea?
Hi,
Thanks for the info,
We will figure out the issue soon.
Thank you.
I think you are not using the new dll. Please remove reference to old dll in your project and re-add the reference. Right click the reference then you can see the new version number in property window.
I tested with following code and it works fine, please check the attached file.
Workbook wb = new Workbook(); wb.Open("d:\\test\\template.xls"); Cell cell = wb.Worksheets[0].Cells["d17"]; cell.Formula = "=SUMPRODUCT(D30:D152,1/(1-F30:F152),E30:E152)/SUMPRODUCT(D30:D152,1/(1-F30:F152))";
wb.Save("d:\\test\\abc.xls");