We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

unknown function name ''if''

when trying to export to Excel, an error is thrown if the function names inside formulas are done in lowercase. If i change ''if'' to ''IF'', it would appear to work. Please can you correct this so that it is not case-sensitive.

Also it would appear that if there are spaces within the formula it gives the error ''Formula string cant be empty''.

Is it possible to NOT validate these things when exporting to Excel as I know that they will work when loaded through excel.

Thanks. Btw I am using 4.102.0.622

Marcus

1 Reply

ST stanleyj Syncfusion Team July 24, 2006 11:24 AM UTC

Hi Marcus,

The case-sensitive issue is corrected in v4.2.. For the cell to be exported as formula, a validation is required. As we cannot pass spaces in formulae when converting to excel, this workaround of avoiding the spaces can be adopted before converting the grid''s content..

private void RemoveSpaces()
{
for(int i=1; i<= this.gridControl1.RowCount; i++)
for(int j=1; j<= this.gridControl1.ColCount; j++)
{
if(this.gridControl1[i,j].CellType == "FormulaCell" && this.gridControl1[i,j].Text.StartsWith("="))
{
string newText = this.gridControl1[i,j].Text;
for(int k=0; k<= newText.Length; k++)
{
int c = newText.IndexOf(" ",k,newText.Length-k);
if(c > 0)
newText = newText.Remove(c,1);
}
this.gridControl1[i,j].Text = newText;
}
}
}

Regards,
Stanley

Loader.
Live Chat Icon For mobile
Up arrow icon