Hi,
I have the following code run with 2 sample files c.xlsm and d.xls the two files are the same just saved in different format.
Before runnning the code below please open both files separatly and note that both have a green triangle on the top right corner of each cell. After running the code below the triangle is gone only for d.xls.
The code below works with d.xls but not with c.xlsm
Workbook wb1 = new Workbook("d.xls");
Worksheet ws = wb1.Worksheets[0];
format(ref ws, 0, 0, 10, 10); //user sub defined
wb1.Save("d.xls");
-------------------
public static void format(ref Worksheet s, int startrow, int startcol, int endrow, int endcolumn)
{
Aspose.Cells.ErrorCheckOptionCollection opts = s.ErrorCheckOptions;
int i = opts.Add();
Aspose.Cells.ErrorCheckOption opt = opts[i];
opt.SetErrorCheck(Aspose.Cells.ErrorCheckType.TextNumber, false);
CellArea ca = new CellArea();
ca.StartRow = startrow;
ca.StartColumn = startcol;
ca.EndRow = endrow;
ca.EndColumn = endcolumn;
opt.AddRange(ca);
}
I will appreciate if you can solve the issue with XLSM files
Thanks