We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Does the XlsIO component support Excel spreadsheets that have VBA code in them?

Platform: WinForms |
Control: XlsIO |
Published Date: April 30, 2011 |
Last Revised Date: July 18, 2014

VBA functions cannot be created using XlsIO but they can be used in templates.This means that you would have to define the functions in VBA using MS Excel and cannot do it during runtime using XlsIO. For example, you can have a spreadsheet that can have macros in it and then use XlsIO to open these spreadsheets as a template and make modifications to the spreadsheet. When this modified spreadsheet is resaved using XlsIO the macro is retained.


  • Create a macro using MS Excel and save the file.
  • Open the saved file with XlsIO.
  • XlsIO preserves the macro during the save process.

XlsIO also provides support for disabling macros in the template workbook as follows.

This will just ignore the macros in the template, and work normally as if there were

no macros in the template.


workbook.DisableMacrosStart = true;


workbook.DisableMacrosStart = True

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon