I am using Aspose.cell version 8.2.0.2. I am checking error. After double click in cell I am getting error “Number stored as Text”. I am using below code.
Hi,
sample code, the error checking option “Number stored as Text” is not
working by Aspose.Cells APIs. I have tested your scenario/ case a bit
using the following sample code and it does not work for both XLS and
XLSX output file formats.
e.g
Sample code:
//Instantiate a new Workbook.
Workbook workbook = new Workbook();
//Input a value to A1 cell.
workbook.Worksheets[0].Cells["A1"].PutValue("1e1");
//I even tried to disable the Excel options but to no avail.
// //Instantiate the error checking options
ErrorCheckOptionCollection opts = workbook.Worksheets[0].ErrorCheckOptions;
int index = opts.Add();
ErrorCheckOption opt = opts[index];
//Disable the numbers stored as text option
opt.SetErrorCheck(ErrorCheckType.TextNumber, false);
workbook.Save("e:\\test2\\outerrorcheckoptions1.xls");
workbook.Save("e:\\test2\\outerrorcheckoptions2.xlsx", SaveFormat.Xlsx);
Hi,
Thanks for using Aspose.Cells.
Please set the range where this setting works. Please see the following code
C#
Workbook workbook = new Workbook();
//Input a value to A1 cell.
workbook.Worksheets[0].Cells[“A1”].PutValue(“1e1”);
ErrorCheckOptionCollection opts = workbook.Worksheets[0].ErrorCheckOptions;
int index = opts.Add();
ErrorCheckOption opt = opts[index];
//Disable the numbers stored as text option
opt.SetErrorCheck(ErrorCheckType.TextNumber, false);
opt.AddRange(CellArea.CreateCellArea(“A1”, “B10”));