Macro

Hi,
We would like call some macro from this products SPC Software for Excel | SPC Excel Add-in | PC and Mac | QI Macros
After we’ve installed this product, all the macros are available in the menu.

How can we call these macros using Apose.Excel?
Please advise.




Thanks.

Hi,

Aspose.Excel doesn’t support calling macros in an Excel file now. It supports to import the template file which have macros. You can change data/formating/… in the file and generate the result file. The macros are reserved.

@cheeching,
Aspose.Excel is discontinued and no more supported now. You may use Aspose.Cells now which contains all the features supported by the previous product along with the latest features available in all versions of MS Excel. You can perform variety of operations using Aspose.Cells like modifying the VBA macros as demonstrated in the following sample code:

// Create workbook object from source Excel file
Workbook workbook = new Workbook(dataDir + "sample.xlsm");

// Change the VBA Module Code
foreach (VbaModule module in workbook.VbaProject.Modules)
{
    string code = module.Codes;

    // Replace the original message with the modified message
    if (code.Contains("This is test message."))
    {
        code = code.Replace("This is test message.", "This is Aspose.Cells message.");
        module.Codes = code;
    }
}

// Save the output Excel file
workbook.Save(dataDir + "output_out.xlsm");

Here is a list of features available in this product:

For testing purpose download the latest version here:
Aspose.Cells for .NET (Latest Version)

A ready to run solution is available here.