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

67 ビュー (過去 30 日間)
Nadia Swastiti
Nadia Swastiti 2020 年 9 月 8 日
コメント済み: dpb 2020 年 9 月 8 日
My excel file has some sheets, but i only want to import one sheet without first row and first column.
  1 件のコメント
dpb
dpb 2020 年 9 月 8 日
Use the 'Sheet' and 'Range' optional arguments to readtable or readmatrix
See the doc for examples.

サインインしてコメントする。

回答 (2 件)

Xavier
Xavier 2020 年 9 月 8 日
opts.Sheet = 'yourSheetName';
T = readtable('youWorkbook.xlsx',opts);
T(1, :) = [];
T(:, 1) = []

Abdolkarim Mohammadi
Abdolkarim Mohammadi 2020 年 9 月 8 日
You should use readmatrix(). For example:
M = readmatrix (filename, 'Sheet', 'MySheet', 'Range','B2:Z10');

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by