How to select a value in filter dropdown in excel

5 ビュー (過去 30 日間)
ashutosh
ashutosh 2014 年 12 月 5 日
回答済み: C.J. Harris 2014 年 12 月 5 日
Hello,
I have three questions.
  • I need to know if there's a way to programmatically select a value in filter dropdown in an Excel sheet.
  • Having selected this value, i need to hit a pushButton (again in the sheet itself).
  • Finally, what can be the approach to expand a pivot table in the sheet.
This sheet has text data.
Your help is highly appreciated for all/any of the above questions.
Best Regards, Ashutosh

回答 (1 件)

C.J. Harris
C.J. Harris 2014 年 12 月 5 日
You might find it a lot easier to just write this specific functionality as an Excel macro, and then invoking the macro from MATLAB.
This can be done like in the example below:
Excel=actxserver('Excel.Application');
OutFileExcel = [pwd, '\Document.xls'];
eW = Excel.Workbooks;
eF = eW.Open(OutFileExcel);
invoke(Excel,'Run','Document.xls!My_Macro');
eF.Save;
invoke(Excel, 'Quit');

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by