Select a range of rows in Excel

조회 수: 36 (최근 30일)
Elles
Elles 2020년 12월 4일
편집: Jon 2020년 12월 4일
Hi,
I am trying to select a number of rows from an Excel sheet. For example, selecting only row 90 to row 233. Can someones advice me how to do this? This is the piece of code I'm trying to change.

답변 (1개)

Jon
Jon 2020년 12월 4일
편집: Jon 2020년 12월 4일
You should be able to use MATLAB's readmatrix function, e.g
data = readmatrix('myfile.xlsx','Range','90:233')
or if the start and end row numbers are variables
startRow = 90
endRow = 233,
range = [num2str(startRow),':',num2str(endRow)] % build string eg '90:233'
data = readmatrix('myfile.xlsx','Range',range)

카테고리

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