We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Create, manipulate or embed Vba codes or macros in Excel spreadsheets using C#

Good day


We have some xlsb files that runs macros on file open. Will Aspos also run the macros when file is opend by aspose.cells

Thanks

Hi,


Thanks for your posting and using Aspose.Cells.

We are afraid, Aspose.Cells cannot run macros, because in order to run macros, we would need to implement macro execution engine which is not only complex but will also be very large like more than 100 MB or may be 500 MB. While, Aspose.Cells itself is just around 10 MB.

However, you can inject or modify your macro code using Aspose.Cells.


Please also read this comment for more help in this regard.

In order to support execution of VB macros, there must be a whole VB macro engine (or execution environment) just like CLR executes C# code and JRE executes Java code or Web Browsers (Chrome, FireFox) executes Javascript code. This is the reason, Microsoft Excel is a big application more than 500MB and Aspose.Cells is just 10 MB. So from here you can imagine its complexity. It needs lots of research and development which is not feasible for us.

However, you can process your own customized functions (which are not MS-Excel built-in functions but functions that are written by you) using Aspose.Cells.

Reference Article Links:


Thanks


I will add code to accomplish the correct result

Hi,


Thanks for your posting and using Aspose.Cells.

I have updated the links in the above post. Hopefully, it will help you implement your own workaround. Let us know if you have any other question. We will be glad to look into it and help you further.