Filter VBA Project while loading a workbook

Filter VBA Project while loading an Excel workbook in C#

Some .xlsm/.xltb files have a very large amount of macros (or very, very long macros). Aspose.Cells will unconditionally load this (meta) data when opening such workbooks. You may need to control this through LoadDataFilterOptions when you really only need to extract sheet names for a large number of workbooks, thus skipping over such unneeded content. This filter is provided by introducing a new option, LoadDataFilterOptions.VBA.

Sample Code

The following sample code loads a workbook such that only VBA is filtered. A sample file for testing this feature can be downloaded from the following link:

sampleMacroEnabledWorkbook.xlsm