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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

unknown function name ''if''

Thread ID:





46834 Jul 21,2006 01:29 PM UTC Jul 24,2006 11:24 AM UTC WinForms 1
Tags: GridControl
Marcus Greenwood
Asked On July 21, 2006 01:29 PM UTC

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


stanleyj [Syncfusion]
Replied On 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;



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon