Save in a variable Excel cells Matlab

1 回表示 (過去 30 日間)
Addison Rodriguez Casallas
Addison Rodriguez Casallas 2017 年 12 月 5 日
would like please can you help me validate the following, I have a database in Excel, this has several columns among which there are numbers, decimals and text, how can I save each excel cell and save them in a variable in Matlab, in order to show them later in a text.
thank you very much for your valuable help,
best regard
Addison

回答 (1 件)

ANKUR KUMAR
ANKUR KUMAR 2017 年 12 月 5 日
filename = 'myExample.xlsx';
sheet = 1;
xlRange = 'B2:C3';
subsetA = xlsread(filename,sheet,xlRange)
  1 件のコメント
Addison Rodriguez Casallas
Addison Rodriguez Casallas 2017 年 12 月 5 日
thanks for your answer, but how I can do for example in the file.xls I have several rows, I want that from matlab when typing an ID this search in the excel file and bring me all the fields in that row. for example I look for the ID 123456 in matlab, if it is in the excel file I need to bring me the whole row that would have the fields name, surname, phone number, age? and that each data of each cell keeps it in a variable. How could I do this ???

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

カテゴリ

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