09-26-2014 04:42 AM
Hi
Using CVI 8.5
My application needs to write an excel file.
some test code :
__caErrChk (ExcelRpt_SetCellValue(SheetMoteur, "A1", CAVT_INT, 30));
__caErrChk (ExcelRpt_SetCellRangeAttribute(SheetMoteur, "A2", ER_CR_ATTR_FORMULA, "=SI(A1=30;0;1)"));
The first line is OK, and 30 is written in A1.
The second line always fails.
'SI' if the french version of 'IF'
if I write directly the formula "=SI(A1=30;0;1)" under excel in A2, it works fine...
__caErrChk (ExcelRpt_SetCellRangeAttribute(SheetMoteur, "A2", ER_CR_ATTR_FORMULA, "=A1"));
the formula "=A1" works fine.
Thanks
09-29-2014 07:35 AM
The help documentation in Excel indicates that you have to separate the function arguments with commas, not semicolons. Check that you are using the correct separator in your function call.
09-29-2014 09:00 AM
Hi.
Thanks , you right.
With comma, it works fine.
What is strange is that the comma are transformed into semicolons in excel.
Must be related to the language. My excel is in french and when I enter a formula directly I must use semicolons.
But to write formula from labwindows, it appears I need to write commas that are traduced into semicolons by excel...
Regards
Chris