필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

The technique of using "xlsread"

조회 수: 1 (최근 30일)
weijie
weijie 2012년 3월 30일
마감: MATLAB Answer Bot 2021년 8월 20일
Hi, I am extracting lots of data from 100 Excel sheets. They are financial statement table. For instance in sheet one, the "Total assets" is in row A10, but in second table, "Total assets" is in row 17. How can I use 'xlsread' function to extract data from the given name? Thank you!
  댓글 수: 1
Leah
Leah 2012년 3월 30일
Is "Total assets" always in column A? Was your example suppose to be: Sheet1 A10 and Sheet2 A17?

답변 (3개)

Leah
Leah 2012년 3월 30일
First you have to read in both numbers and txt
[num txt]=xlsread('Book2.xlsx','Sheet1')
then you can find the cell that contains Total assets
ismember(txt,'Total assets')
Without knowing exactly what else is in your sheet it's hard to give you much more. Hope it helps.

Image Analyst
Image Analyst 2012년 3월 30일
Unless you use ActiveX programming, reading 100 Excel files will be horribly slow because it will involve launching Excel, reading the data, and shutting down Excel 100 times. Better to just open Excel once, reading the files, then shutting it down once. That will bring the time from very many minutes to probably less than one minute.

Richard
Richard 2012년 4월 3일
The following link may be useful:
<http://www.mathworks.com/matlabcentral/fileexchange/22365-function-for-faster-data-transfer-matlab-%3C-%3E-excel>
It follows from image analysts' suggestion.

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by