How to download workspace to a .xls file?

10 ビュー (過去 30 日間)
Missael Hernandez
Missael Hernandez 2021 年 9 月 18 日
コメント済み: Image Analyst 2021 年 9 月 19 日
I have a hundreds of variables that are defined as strings. For example,
a = "hello world"
b = "Today is sunny"
c = "It is Friday"
These variables are obviously stored in the workspace. How can I download the Workspace to a .xls file such that the strings can be modified by someone who may not have MATLAB in Excel? But also update the string on the Workspace once I upload the updated .xls file. Like for example, someone updates
b = "Today is rainy"
in Excel, and now I would also like to update in the MATLAB workspace. Thank you!

回答 (1 件)

Image Analyst
Image Analyst 2021 年 9 月 18 日
Try readcell() and writecell(). If someone changes it in Excel, it won't automatically update the workspace in MATLAB. You'll have to call readcell() to read in the changed workbook file.
  2 件のコメント
Missael Hernandez
Missael Hernandez 2021 年 9 月 18 日
Not automatically. I meant once the .xls file is updated and put on the Current Folder.
Image Analyst
Image Analyst 2021 年 9 月 19 日
OK then readcell() should work.

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

カテゴリ

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