How can I write N-dimensional numeric array into excel sheet?

조회 수: 2 (최근 30일)
Waseem AL Aqqad
Waseem AL Aqqad 2022년 3월 17일
댓글: Waseem AL Aqqad 2022년 3월 17일
I have a 1x120x289 numeric array (attached) that I want to write the different 289 pages into 289 different colomns in one excel sheet. Your help is appreciated.
Thanks!

채택된 답변

KSSV
KSSV 2022년 3월 17일
편집: KSSV 2022년 3월 17일
Why you want to write it in different pages? You can write in a single sheet; so that it woul dbe easy while reading. LEt A be your 1X120X289 data array.
A = squeeze(A) ; % this will change 1X120X289 to 120X289
xlswrite('test.xlsx',A) ; % write data to excel file
% REad the file
A = readmatrix('test.xlsx') ; % your A would be 120x289, you can access each column now
  댓글 수: 3
KSSV
KSSV 2022년 3월 17일
Ohh..yes, there is type error. A matrix cannot be written using writetable. You can use xlswrite. Edited the answer.
Waseem AL Aqqad
Waseem AL Aqqad 2022년 3월 17일
It works now. Thanks again bro.
Much appreciated.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by