Find and read a value in an excel spreadsheet

2 ビュー (過去 30 日間)
Nathan Kennedy
Nathan Kennedy 2017 年 9 月 5 日
回答済み: KL 2017 年 9 月 5 日
Hi,
If I create two arrays in MATLAB that represent and store the column name and row names of a table, I want to then find the matching value in an excel spread sheet corresponding to the column name and row name elements
Possible?
Thanks, N Kennedy

回答 (1 件)

KL
KL 2017 年 9 月 5 日
Something like this?
filename = 'myExample.xlsx';
sheet = 1;
columnNames = {'A','B','C'};
rowNames = {'1','2','3'};
xlRange = [columnNames{1} rowNames{1}];
yourData = xlsread(filename,sheet,xlRange);

カテゴリ

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