We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Formula Error Checking preferences

Hi guys, is there a way to turn off formula errors or is that a user’s registry setting.

We want to turn off “formulas that omit cells in a region” under the old tools menu or the Options, Formulas, Error Checking preferences.

We have v 5.0.0.0 but not sure this functionality has been already added.

thanks
Marty

Hi Marty,


See the sample code:

Workbook wb = new Workbook(“e:\test2\booker.xls”);
Aspose.Cells.Worksheet sheet = wb.Worksheets[0];
Aspose.Cells.ErrorCheckOptionCollection opts = sheet.ErrorCheckOptions;
int i = opts.Add();
Aspose.Cells.ErrorCheckOption opt = opts[i];
opt.SetErrorCheck(Aspose.Cells.ErrorCheckType.TextNumber, false);
CellArea ca = new CellArea();
ca.StartRow = 0;
ca.StartColumn =0;
ca.EndRow = 65535;
ca.EndColumn = 255;
//disable the check for numerics saved as text
opt.AddRange(ca);
wb.Save(“e:\test2\outbooker.xls”);

Please check the Aspose.Cells.ErrorCheckType enumeration for the complete list of supported Rules/types by latest Aspose.Cells for .NET version e.g v7.1.1.

Thanks Amjad!

Is it safe to set the range like that for the entire spreadsheet or is this just an example? Normally, I would assume you should set it for the range the formula covers, etc.

So because there is a range, I assume this saves it in the specific spreadsheet and overrides the excel preferences in the options menu. I.e. I can copy this spreadsheet and the disabled checks will be off for whoever opens the spreadsheet?

thanks again for your quick reply!!!
Marty

Hi,


Yes, doing my suggested steps as pointed out in the example code is fine.

Thank you.