How to read a Ms Word using MATLAB
9 ビュー (過去 30 日間)
古いコメントを表示
Greetings,
I wish to read the Microsoft Word using MATLAB. My filename is GAN_1901.txt. Below is the Ms Word to read by MATLAB.

0 件のコメント
回答 (1 件)
TARUN
2025 年 2 月 5 日 7:06
Hi Khairul,
You can achieve this using “actxserver” function in MATLAB. Here is an example code of how you might read the text from a Word document:
wordApp = actxserver('Word.Application');
filePath = 'C:\path\to\your\document.docx'; % path to your GAN_1901.txt file
document = wordApp.Documents.Open(filePath);
content = document.Content.Text; %reads the text from file.
disp(content);
document.Close;
wordApp.Quit;
Feel free to refer to the “actxserver” documentation here:
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Text Files についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!