作者amateuruser (( ・ω・`))
看板MATLAB
標題[討論] 如何讀取 excel 中 多個sheet的 同一個
時間Wed Dec 12 22:46:15 2018
如題
目前手邊有一個excel raw data
Excel內部有多個sheet 且每個sheet都有裝資料
請問一下如何利用loop迴圈 將每一個sheet中固定儲存格讀取 且儲存成vector or array ?
Ex:假設每個sheet都是A1這個儲存格的data要取出來
謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 27.247.225.215
※ 文章網址: https://webptt.com/m.aspx?n=bbs/MATLAB/M.1544625979.A.AFE.html
1F:推 linkinflyer: 假設檔名叫QQQ.xlsx,共10個sheet12/13 23:50
2F:→ linkinflyer: for i = 1:10 12/13 23:51
3F:→ linkinflyer: data(i) = xlsread('QQQ.xlsx',i,'a1')12/13 23:51
4F:→ linkinflyer: plot((1:10),data)12/13 23:51
5F:→ linkinflyer: 抱歉 plot前要加一個end12/13 23:52
感謝大大 我研究一下
※ 編輯: amateuruser (39.8.165.144), 12/14/2018 00:28:11
請問一下l大 我試了一下 好像還是有誤耶
In an assignment A(:) = B, the number of elements in A and B must be the same.
顯示是這樣的
※ 編輯: amateuruser (39.8.165.144), 12/14/2018 00:34:46
剛才又改了一下
clear;
for i=1:10;
data(:,i)=xlsread('test.xlsx',i,'A1');
end;
不過錯誤變成這個:
Assignment has more non-singleton rhs dimensions than non-singleton subscripts
※ 編輯: amateuruser (39.8.165.144), 12/14/2018 00:42:19