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.
Unfortunately, activation email could not send to your email. Please try again.

Using XlsIO to Call Macro in Excel

Thread ID:

Created:

Updated:

Platform:

Replies:

110910 Aug 30,2013 01:46 AM Aug 1,2018 05:40 AM Windows Forms 6
loading
Tags: XlsIO
Chen
Asked On August 30, 2013 01:46 AM

Dear SupportTeam,

In my C# project, I use XlsIO to open an exsting Excel file with macro in it.

Will you please show me how to call an exsting macro in Excel file ?

Thanks


Chen
Replied On September 1, 2013 11:02 PM

I explore some articles in your Forum and find the answer.

Because XlsIO does not support Macro, i already found other solution for my problem.

Thanks.


Sridhar [Syncfusion]
Replied On September 2, 2013 01:02 AM

Hi Chen,

Thank you so much for the update.

We are glad to know that the above reported issue has been resolved at your side. Also, please get back to us if you have any queries.

Thanks,
Sridhar.S


Mangesh Hirave
Replied On March 17, 2016 03:32 PM

Hi Chen,
Can you please provide me the solution or a link to where you found the answer?
Thanks


Dilli Babu Nandha Gopal [Syncfusion]
Replied On March 18, 2016 01:21 AM

Hi Mangesh,
 
You can create an AddIn for the macro and invoke the AddIn function from XlsIO. A brief explanation about the usage of Excel Add-in in XlsIO is available in following UG link.

 

UG documentation link: http://help.syncfusion.com/file-formats/xlsio/working-with-formulas#add-in-functions

 

Regards,

Dillibabu.


Davide Azzaroni
Replied On July 31, 2018 05:10 AM

Hi,
 I need to clear filter in a table, but I know that there isnt a clear method to do it.
So I made a Macro that does it and save it in a Add in.
Then I loaded the Addin from code, but I do not know how to call the addin(macro)
can you help me?
thank you


Prakash Kumar D [Syncfusion]
Replied On August 1, 2018 05:40 AM

Hi Davide, 

Currently, XlsIO doesn't have support for Macro manipulation. We have added it to feature request list and it will be implemented in any of our upcoming releases.  

To clear the filters in the table, we suggest you disable the IListObject.ShowAutoFilter property. Please refer the code snippet below. 

Code snippet: 
//Create table 
IListObject table = worksheet.ListObjects.Create("Table", worksheet["A1:C7"]); 
                
//Add filter 
IAutoFilters filters = table.AutoFilters; 
IAutoFilter filter = filters[0]; 
filter.AddTextFilter("Ernst Handel"); 
                
//Clear filter 
table.ShowAutoFilter = false; 
 
Regards,
Prakash Kumar
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

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.

;