필터 지우기
필터 지우기

How to read an excel spreadsheet, fetch a certain cell data

조회 수: 7 (최근 30일)
anush
anush 2017년 8월 30일
댓글: anush 2017년 8월 30일
  • *Hallo all, I think it might be pretty easy. For now i don't get it. How can i read an excel sheet having certain data. I have data with variables and also numerical values.How can i read specific cell i want to read. I am able to read the data of a specific cell by num = xlsread(filename,xlRange). The problem is, i have created my structure and i need to assign the data values from the read excel sheet to my structure. how do i do that ? please help any example would be helpful.!!
thanks.**

답변 (1개)

KALYAN ACHARJYA
KALYAN ACHARJYA 2017년 8월 30일
%
filename='excel_sheet.xlsx'; % This file should be inside the working directory/Complete path Name
sheet=1;
cell_location='A2'; % Cell location % For range use 'A2:B6'
data=xlsread(filename,sheet,cell_location);
%
  댓글 수: 1
anush
anush 2017년 8월 30일
Thank you for your solution Kalyan. Reading an excel data from a cell_location i was able to do. I am stuck in how to write that "read excel data" into my structure which i have defined.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by