I use Aspose.Cells 4.1.1 to save a file which contains 10-14 sheets and about 30-40MB i got this exception occasional
error in writing cellAS2421 Exception: System.Exception Message: error in writing cellAS2421 Source: Aspose.Cells at Aspose.Cells.Cell.ֈ(Byte[]& ֞, Int32& ׃, ٨ Ԅ) at Aspose.Cells.Cells.ֈ(٨ Ԅ, FileFormatType ։) at Aspose.Cells.Worksheet.ֈ(٨ Ԅ) at Aspose.Cells.Worksheets.ֆ(٨ Ԅ) at Aspose.Cells.Worksheets.֊(FileFormatType ։) at Aspose.Cells.Workbook.Save(Stream stream, FileFormatType fileFormatType) at Aspose.Cells.Workbook.Save(String fileName, FileFormatType fileFormatType)
cause it was confused and i have no idea about what is it doing
Was this error ever figured out? We just started seeing this error for a report we generate, but it’s only under certain circumstances. (FYI, we use Aspose.Cells version 4.4.3.1 and upgrading to a newer version is a last resort.)
Here’s the exception:
System.Exception: error in writing cellY152 at Aspose.Cells.Cell.xc26afd5362f5c1ec(Byte[]& x4a3f0a05c02f235f, Int32& x30cc7819189f11b6, xaae832abae2edf07 xcf18e5243f8d5fd3) at Aspose.Cells.Cells.xc26afd5362f5c1ec(xaae832abae2edf07 xcf18e5243f8d5fd3, FileFormatType xab59d5b558cd3dde) at Aspose.Cells.Worksheet.xc26afd5362f5c1ec(xaae832abae2edf07 xcf18e5243f8d5fd3) at Aspose.Cells.Worksheets.x668135b31fe5c8d9(xaae832abae2edf07 xcf18e5243f8d5fd3) at Aspose.Cells.Worksheets.x806178efa0bb6fcf(FileFormatType xab59d5b558cd3dde) at Aspose.Cells.Worksheets.xc26afd5362f5c1ec(Stream xcf18e5243f8d5fd3, FileFormatType xab59d5b558cd3dde) at Aspose.Cells.Workbook.Save(Stream stream, FileFormatType fileFormatType) at Aspose.Cells.Workbook.Save(String fileName, FileFormatType fileFormatType)
It will be highly appreciated, if you can try the attached latest version of Aspose.Cells (V4.5.1.17). This new fix is very much stable than the old version you are currently using. We have supported a lot of new features and fixed a lot of bugs which were occurring in the previous releases.
If you still face any problem please upload your template file and we will figure it out soon.
Thanks for your response. I am working on a project with a release in the very near future, so upgrading the Aspose.Cells version is likely out of the question due to timing. Even so, I still updated the dll just to see if it would solve the problem, which it did not. Instead, however, I now see a different error message. I am not sure if this is the same error with more information or a different error, but this is what now happens when the save method is called on the workbook:
Aspose.Cells.CellsException: Invalid formula: =Round(0, 0) at Aspose.Cells.Cell.?(Byte[]& ?, Int32& ?, Int32 ?, ? ?) at Aspose.Cells.Cells.?(? ?, FileFormatType ?) at Aspose.Cells.Worksheet.?(? ?) at Aspose.Cells.Worksheets.?(? ?) at Aspose.Cells.Worksheets.?(FileFormatType ?) at Aspose.Cells.Workbook.Save(Stream stream, FileFormatType fileFormatType) at Aspose.Cells.Workbook.Save(String fileName, FileFormatType fileFormatType)
As far as I am aware, =Round(0, 0) is a perfectly legitimate Excel function. Do you have any information on what is causing this problem? I have to believe you’ve seen something of this nature before. (FYI, our report is generated completely by Aspose–there is no template being used.)
Well, we are not quite clear what the problem is, so can you please create a sample console application of your code and post it here. This will make it easier to track the issue soon.
After some more testing, we determined that, for some reason, it couldn’t handle the formula =Round(0, 0), so what we did was to just check for that exact formula and replace it with a value of 0. It now works, although admittedly it is a workaround.
I will say that we’d still be stuck if we didn’t try the new version, simply because the exception message was much more helpful.