MATLAB Answers

How to import excel file only one sheet and skip first column?

5 views (last 30 days)
Nadia Swastiti
Nadia Swastiti on 8 Sep 2020
Commented: dpb on 8 Sep 2020
My excel file has some sheets, but i only want to import one sheet without first row and first column.

  1 Comment

dpb
dpb on 8 Sep 2020
Use the 'Sheet' and 'Range' optional arguments to readtable or readmatrix
See the doc for examples.

Sign in to comment.

Answers (2)

Xavier
Xavier on 8 Sep 2020
opts.Sheet = 'yourSheetName';
T = readtable('youWorkbook.xlsx',opts);
T(1, :) = [];
T(:, 1) = []

  0 Comments

Sign in to comment.


Abdolkarim Mohammadi-Balani
You should use readmatrix(). For example:
M = readmatrix (filename, 'Sheet', 'MySheet', 'Range','B2:Z10');

  0 Comments

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!