Write in an opened excel file using MATLAB

9 ビュー (過去 30 日間)
Max
Max 2022 年 5 月 21 日
コメント済み: Max 2022 年 6 月 1 日
I would like to search for a specific number like (5444 ) in column B and insert a number like (300) next to it in column C using matlab script while the file is opend , thanks
date B C
05/20/2022 5444 ?
05/22/2022 5445 ?
FileName = 'C:\\\\Desktop\test.xlsx';
  6 件のコメント
Walter Roberson
Walter Roberson 2022 年 5 月 31 日
Have you considered using xlswrite1() that I linked to? It opens a connection to excel and leaves it open for efficiency, and can write by range specification.
Max
Max 2022 年 6 月 1 日
I have but I could not get to work while the file is open

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

回答 (1 件)

Walter Roberson
Walter Roberson 2022 年 5 月 23 日
In particular the reading logic
Select(Range(Excel,sprintf('%s',range)));
DataRange = get(Excel,'Selection');
and then
rawData = DataRange.Value;
to fetch the data from Excel.

カテゴリ

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