e.Workbook​s.open(FIL​E_NAME);

21 ビュー (過去 30 日間)
Dennis Bellamy
Dennis Bellamy 2017 年 11 月 29 日
回答済み: Greg 2017 年 12 月 1 日
every time I try the 'Open'
FILE_NAME = 'E:\Nov_2017\CP-140_NOV-17\1_FORCE_DATA.xls'
eWorkbook = e.Workbooks.open(FILE_NAME);
command, it comes back with: Error using open Too many input arguments.
any idea why?
  6 件のコメント
Walter Roberson
Walter Roberson 2017 年 11 月 30 日
Notice it has Open with a capital 'O'.
Dennis Bellamy
Dennis Bellamy 2017 年 12 月 1 日
In my defence, I am working on three blocks of code and LaTex trying to get this data filtered, saved, and charted....
Probably should have noticed that myself so THANK YOU for pointing it out....
next question, how do I get the merged cell to centre the data? and can I make charts in Excel directly from MATLAB? and finally, is there an index of commands that I can use with e.Workbooks so that I can find these answers on my own?
thanks again for your help.

サインインしてコメントする。

回答 (1 件)

Greg
Greg 2017 年 12 月 1 日
For simple stuff, use properties(e) and methods(e) as Guillaume has indicated, with the extra knowledge that Microsoft Office products are (almost?) always capitalized, and MATLAB often start lowercase.
For more involved stuff, open Excel (or Office application of your choice), and change your help to "Developer Reference" then click "Excel Object Model Reference." You can browse a VAST library of VBA/API information this way (and without an internet connection). See attached image.

カテゴリ

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