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

30 visualizaciones (últimos 30 días)
Nadia Swastiti
Nadia Swastiti el 8 de Sept. de 2020
Comentada: dpb el 8 de Sept. de 2020
My excel file has some sheets, but i only want to import one sheet without first row and first column.
  1 comentario
dpb
dpb el 8 de Sept. de 2020
Use the 'Sheet' and 'Range' optional arguments to readtable or readmatrix
See the doc for examples.

Iniciar sesión para comentar.

Respuestas (2)

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

Abdolkarim Mohammadi
Abdolkarim Mohammadi el 8 de Sept. de 2020
You should use readmatrix(). For example:
M = readmatrix (filename, 'Sheet', 'MySheet', 'Range','B2:Z10');

Categorías

Más información sobre Data Import from MATLAB en Help Center y File Exchange.

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by