Free Support Forum - aspose.com

Can Aspose.Cells run Macros?


#1

Hello,

I originally sent out this email to sales@aspose.com but, for some weird reason, they told me to post this question in the public forum instead of providing me with sales information about the product so…here goes.

We’re looking for a solution we can integrate into our product to solve a couple of products we’re having and came across the Aspose.Cells product, so I wanted to know if it can potentially solve our problems.

Basically, one of the features in our product is the ability to associate an Excel spreadsheet with our product, so that when complex calculations are required we can rely on Excel to run any custom macros the customer might have and calculate the outputs for us.

The way it works is simple:

  • We let the user associate an Excel spreadsheet with a template, as well as the inputs to provide to the Excel doc (e.g. our property_x will be input as Cell X1)
  • When it is necessary, we launch Excel (either in the foreground or background) so it can run the macros associated with the file
  • And, lastly, we read back results produced by the Macro and import that output data into our product

However, there are a few problems with this approach:

  • It requires a full Excel user license in order for us to be able to launch Excel and that is very costly to our customers
    • It is not a big problem for the regular desktop product BUT it becomes a problem when we do hosting for our users, where we need to have them pay for ANOTHER Excel license just to have the feature work when needed
  • I want to avoid relying on an executable to run external code
    • And, now that we’re moving to a web platform, I’m not sure we’ll be able to properly run Excel in the background from a Windows Service, so I’m worried about it

So what I’m looking for is the ability to programmatically run Macros on an arbitrary Excel spreadsheet without having to launch .exe files OR requiring a full copy of Excel.

Is this something Aspose.Cells can help us with? If so, what is the cost associated with it and can we setup a sales call to see a demo of it and ask technical questions?

p.s. our product is developed in a mix of VB6 and .NET so, at a minimum, we need a .NET capable API!
Also, REST APIs are highly desirable to me.

Thank you!


#2

@lmsilva,

Thanks for the details.

You can use Aspose.Cells to accomplish all the tasks except running or executing macros. I am afraid, currently, Aspose.Cells does not support to execute/run vba codes or macro functions although we have supported to create, manipulate or embed VBA codes/ macros. We still however could not support to run or execute macros or vba code. For your information, Aspose.Cells is a spreadsheet management library/APIs used to manage or manipulate MS Excel spreadsheets using its file formats, i.e., XLS, XLSX, XLSM, XLSB, CSV, SpreadsheetML, ODS, etc. It supports almost all the features of MS Excel (2003 - 2013/2016). It also supports some other useful features like Excel to PDF, Excel to HTML and Sheet to image features. I think currently, you may try to use/set Custom Functions (if in those macros you manipulate some custom oriented formulas/functions) to support your requirements by Aspose.Cells API if it could suit your needs, see the documents for your reference here:
https://docs.aspose.com/display/cellsnet/using+icustomfunction+feature
https://docs.aspose.com/display/cellsnet/Implement+Custom+Calculation+Engine+to+extend+the+Default+Calculation+Engine+of+Aspose.Cells

We are very sorry for any inconvenience caused!