Free Support Forum -

Backward compatibility of Aspose.Cell.dll (Ver with latest version

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

We are using Aspose.cell component (version is and planning to upgrade with latest version. I know there must be new features in the latest version and may have backward compatibility with older version however just wanted to get confirmation from your side for the backward compatibility. We would like our existing application should work without any issue on new version.

We are using Aspose.cell component for exporting the data in excel for reporting purpose and using basic formatting functions.

Your early response will be appreciated.




Thanks for your query.

Well, you may not need to change your existing code much as you are using simple / basic features, although you have to update your existing code a bit. For your information, in the new versions, we have re-organized API structure (we have added some new namespaces and move the relevant APIs to them to make it more compact and organized)
Also, we have renamed some APIs (regarding collection classes) e.g Validations class now becomes ValidationCollection, similarly, Worksheets class becomes WorksheetCollection, etc., There are quite a few other examples too. For a complete reference, please see the Aspose. Cells. Documentation and its API Reference:
Now let me come towards your significant change in your existing code for formattings that you have to update your code a bit accordingly:

1) Aspose.Cells.Style property is eliminated/obsoleted now, you should adjust your code to use Aspose.Cells.GetStyle() and Aspose.Cells.SetStyle() methods, it will also enhance your performance to a certain extent:

Your sample code using Style attribute should be updated accordingly, e.g
Style style = wsNdaa.Cells[0, 0].GetStyle(); // here wsNdaa is worksheet object
style.Font.IsBold = true;
wsNdaa.Cells[0, 0].SetStyle(style);
Styyle style2 = cells["I1"].GetStyle();
style2.HorizontalAlignment = TextAlignmentType.Center;
style2.BackgroundColor = System.Drawing.Color.Navy;
style2.Font.IsBold = true;

For a complete reference, please see the documentation in the relevant sections:

2) Workbook.Open method is obsoleted and you should now use Workbook constructor instead, see the sample code line below:

Sample code:
Workbook wb = new Workbook ("e:\\test2\\Book1.xlsx");

Hopefully, now adjusting your code segments accordingly, everything would be fine.
Let us know if you need further help.


Thanks Amjad for your detailed response. This is very helpful to analyze our required changes to existing code.




That is good. Feel free to contact us any time if you need further help or have any issue, we will be happy to assist you soon.

Thank you.