Error Saving File Given by Aspose

Greetings,

Aspose.Cells - 4.8.2

I've got a client that is reporting a problem with our applicatioin, howver, looking at the stack trace (which I point to a diagnostic screen) I see that it is Aspose that has thrown an exception. Since the assembly is obfuscated, I cannot tell exeactly where or why the Aspose component has failed. A copy has been attached

When you look at the stack trace, you can see my application calling my export function, then calling a check format function, then calling the Aspose.save function, then a bunch of obfuscated Aspose calls related to the save function (at least what I think they are) and then finally the failure when your save function calls the system.array.copy function.

When the aspose save function calls the system.array.copy function, the specific failure message is "Destination array is not long enough. Check destindex and length, and the array's lower bound"

Now, of course, I cannot get the application to reproduce the problem in development, but I need to figure out why and where this is happening.

I've attached the file that she reports that this is happening to when it is saved. What is strange is that our "checkformat" function, which is what calls your save function is simply opening the file and checking the worksheets to make sure that the right worksheets are there, and then saving the file (actual code attached).

Of course, after the error is thrown, the file is reduced to 0 in size, which ruins the original file.

These guys are breathing down my neck, your assistance is appreciated.

<?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /> <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Hi,

Please try the attached latest version/fix, I have tested your case with your code but could not find the issue, it works fine.

Thank you.

I'm having to recode a bunch of stuff due to the "style" method not being there anymore, it has been replaced by "setStyle" and "getStyle".

Is there any documentation on this?

I will let you know if this solves the problem

Hi,

Yes we are going to obsolete the Style attribute in the upcoming versions for performance grounds. You should use Cell.GetStyle and Cell.SetStyle methods instead. The procedure is simple, create a Style object, you can either obtain an existing style of a cell or add style to the Styles collection, now specify formatting attributes using the Style object, finally apply the style to the cell using Cell.SetStyle() method.

See some documents for reference:
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/approaches-to-format-data-in-cells.html
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/colors-background-patterns.html
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/colors-and-palette.html


Thank you.

Amjad,

Is there some type of fix between 4.8.2.0 and 4.8.2.13 that you think will fix the problem we've experienced?

I've looked at the documentation for the new style settings and it is going to be a real pain to fix all of the locations where the style method was used. Especially due to the fact that in many cases, we are passing around cells and not the workbook for processing, which is the only way that you indicate you can set the cells styles for multiple cells using the same style object, as it has to be added to the workbook.

I sure would have thought that you could just define a style, give it attributes, push it onto the cells as needed, all without getting into adding it to the workbook object.

Hi,

mdjtlj:

Is there some type of fix between 4.8.2.0 and 4.8.2.13 that you think will fix the problem we've experienced?

Well, I am not sure but I think you may try to get the versions browsing the Aspose.Cells forum posts in the threads (from different users) and give it a try. By the way why you want to use the fix b/w v4.8.2.0 and v4.8.2.13. We recommend using the latest fix than previous.

mdjtlj:

I've looked at the documentation for the new style settings and it is going to be a real pain to fix all of the locations where the style method was used. Especially due to the fact that in many cases, we are passing around cells and not the workbook for processing, which is the only way that you indicate you can set the cells styles for multiple cells using the same style object, as it has to be added to the workbook.

Well, I am afraid, you need to do this for performance considerations, the new approach (Cells.GetStyle and Cell.SetStyle) gives you best performance in most diverse scenarios.



Thanks for your understanding!

Amjad,

Let me rephrase my question. Where there any modifcations that you guys made to the code between 4.8.2.0 and 4.8.2.13 which would address this issue that I'm having? I'm not interested in using an intermediate version, but want to know that I'm not going to do a lot of work for no good reason at this point, as this would be a "hot-fix" for us.

Michale