Hello,
is it possible to disable error checking for cells with aspose? The code below produces an error for the cell with the formula as excel thinks you missed data. I don't want to show that as I know I did the right thing, there is no error. In excel, one can disable the error checking for cells. Can we do that with aspose too?
Thank you, best regards,
-Hendri.
Workbook wb = new Workbook();
Worksheet ws = wb.Worksheets["Sheet1"];
ws.Cells[0, 0].PutValue(5);
ws.Cells[1, 0].PutValue(6);
ws.Cells[2, 0].PutValue(7);
ws.Cells[3, 0].PutValue(8);
ws.Cells[4, 0].PutValue(9);
ws.Cells[5, 0].PutValue(10);
ws.Cells[7, 0].Formula="=SUM(A1:A4)";
wb.Save("test.xls");
Hi,
Thanks for considering Aspose.
Well, I tried your code and its fine as it does not produce any exception.
Do you mean that when you open the resultant file into MS Excel, there is an info type error marked by a small green triangle with the formulated cell's upper left corner and saying i.e., Formula Omits adjacent cells. Well, this is an Excel's default info type error and not an Aspose.Cells error bcause Excel thinks that perhaps you have missed the adjacent cells. To avoid this I think you may try replace the formula line of code with: ws.Cells[7, 0].Formula="=A1+A2+A3+A4";
Thank you.
Hi,
Indeed I meant the green triangle in Excel. The workaround works, but it is fairly cumbersome and as I need to sum lots of cells, it will look a bit foolish, as if I never heard about the sum function. Excel does allow ignoring the "errors" cell by cell and for the entire workbook. It would be nice if Aspose would support this too so that we can override this automatic and unwanted behaviour of excel.
Thanks, best regards,
-Hendri.
Hi Hendri,
Aspose.Cells can only handle settings in Excel files but cannot handle MS Excel because it's indepedent with MS Excel.
To remove this error indicator, please change the setting in your MS Excel: Tools->Option->Error Checking-> uncheck "Formula omits cells in region" option.
Hi Laurence,
There is a way in Excel to do this cell by cell and save the result. That's why I think it could be in the file, also by Aspose.
Best regards,
-Hendri.
It seems that MS Excel write some hidden data in Excel file. Currently we don’t have any clues about them.
Hi Laurence,
Ok, I understand. Do you think you will be able to have a look at this and possibly implement it in Aspose?
Thank you, best,
-Hendri.
Hi Hendri,
We will check this issue but I am not sure if we can make it now.