Specified matrix range to Excel file

조회 수: 3 (최근 30일)
Dominika Szt
Dominika Szt 2017년 4월 29일
댓글: Image Analyst 2017년 4월 29일
Hi everyone! I am trying to export matrix A to Excel file. The matrix is quite big and I need only specified rows of it (e.g. from 8 to 12 - it's 4 rows). When I use:
Range = 'A8:Z12'
xlswrite('file',A,Range);
it exports not the 8-12 matrix rows, but saves first 4 rows in 8-12 range in Excel. Does anyone of you know how to solve this problem?

채택된 답변

Pouya Jamali
Pouya Jamali 2017년 4월 29일
Hi,
Did you try using a medium variable? I mean before you try to save your matrix A in an Excel file save those elements you want in another Matrix, lets say aux_A then save it into an Excel file.

추가 답변 (1개)

Dominika Szt
Dominika Szt 2017년 4월 29일
Och, you're right, now it looks perfect. Thank you very much!
  댓글 수: 3
Dominika Szt
Dominika Szt 2017년 4월 29일
Ok, thanks. I'm a fresh user so any tips are welcomed :)
Image Analyst
Image Analyst 2017년 4월 29일
Here's another tip, if you're willing to learn how to use ActiveX to gain total and complete control over Excel. See attached demo that only breaks the surface of what you can do with ActiveX. Basically ActiveX lets you do anything from MATLAB that you could do manually or from a macro in Excel itself.

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

카테고리

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