Can aspose.cells execute macro from excel file

Hi,

As your product aspose.cells states that it can support *.xlsm (macro enable workbook) files, can it execute the macro from files? if yes, how to do that?

Thanks!

Best regards,
Mike

Hi,

Thanks for your question and considering Aspose.Cells for .NET.

I am afraid, this feature of Aspose.Cells for .NET is not available and it cannot run VBA macros.

However, Aspose.Cells can preserve VBA macros, means, if your source/template files has VBA macros then it will not delete them in output files.

We have already logged this feature request. But we cannot implement macros feature in near future.

This issue has been logged as CELLSNET-40353.

There are many weib site advertied as Apose is supporting Macros and Addins. Not sure at what level. I have code undeneath workbook_open event which doesnt get fired until I clicked on enable macro warning on the top. I can fix thsi on my box by changin the macro security level but cant go to every other user to fix this. I need my event to be excuted without any manual action from the user.

Any help using Aspoe please..

Hi,


I have logged a new ticket for your requirement i.e. disable macros warning in MS Excel.
The ticket is logged with an id: CELLSNET-40695. We need to look into it if we can support it.

Once we have any update on it, we will let you know here.

Thank you.

Thanks for your prompt reply.

Just to clarify it’s not just about disabling warning but also making sure the workbook _open event fire on excel opening rather then waiting to click on enabled macro warning. .

Hi,

Thanks for your posting.

I have logged your comments in our database against the issue id: CELLSNET-40695

However, I am afraid, this is difficult feature and it could take months. Development team will look into its feasibility and implement it if it is possible.

In case, this feature is available earlier, we will update you asap by posting here.

Hi,

It’s a behavior of Ms-Excel so it cannot be avoided.

Please create a sample file as needed by you and provide us, we will check it.

Hi there should be a way to control this. We had a control on this with.Net application and invoking excel from it. We used to call the VBa function directly fom the code ...

Do you have this option atleast to call the vba function from .Net using aspose. .

Please find the attached. There is message box pop up on the the opening of excel. If you see the message it mean your macro security is at low level. Change it to the miduam and try to open the excel again . you wont see the message but there will be warning messae on the top saying " Enable Macro" . If you say enable macro, messagebox will be pop on the screen.

How do I make this work smoothly without manul action from the user. In short do you have any ways to control the macro security ? If not can we call the vba function using aspose from the .Net. Its very much possiable with standard .Net componenet and excel. We have this running in production today.

Hi,

Thanks for your sample file.

We have logged your file and the issue description against the issue id: CELLSNET-40695 for investigation.

We will look into it and once we have some update for you, we will let you know asap.

Hi,

a) It’s the setting of MS Excel application, so we could not control the
macro security by file.

b) Aspose.Cells does not support calling the vba
function. We just support keeping and removing them now.

We have similar requirement to run VBA macros from excel file using aspose.cells for .NET

Is there any progress on the issue CELLSNET-40353?

Thanks

Srini

Hi,


I am afraid creating/executing vba/macros feature is still not available. Once we have any update/schedule on it, we will share it here. Also, since the feature is complex and different so it might not be supported soon.

Sorry for any inconvenience caused!

Are macros supported in the latest version of Apose cells.Net?

Hi,

Thanks for your posting and considering Aspose.Cells.

We are afraid, execution of macros are still not supported by Aspose.Cells. Also, it is not in our plan to support injection/execution of macros in near future.

Hi,

Thanks for using Aspose.Cells.

We only plan to create, manipulate or embed VBA codes/ macros later. We however cannot support to run or execute macros. Does it fit your needs?

Hi,


We did evaluate issue logged earlier as “CELLSNET-40695”. I am afraid, since it’s the setting of MS Excel App, so, we cannot support it. Also, we have already supported to modify vba codes since the release of v8.8.0.

Thank you.