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.
Unfortunately, activation email could not send to your email. Please try again.

unknown function name ''if''

Thread ID:

Created:

Updated:

Platform:

Replies:

46834 Jul 21,2006 09:29 AM Jul 24,2006 07:24 AM Windows Forms 1
loading
Tags: GridControl
Marcus Greenwood
Asked On July 21, 2006 09:29 AM

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

stanleyj [Syncfusion]
Replied On July 24, 2006 07:24 AM

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

CONFIRMATION

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.

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.

;