Can one let Matlab to remove lines of the spreadsheet before the data?

1 view (last 30 days)
I have a spreadsheet "visitors.xlsx" like
title of the spreadsheet: daily visitors
source: state
date visitors
January 1 2020 100
January 2 2020 50
A brute force is that I open spreadsheet by Excel and remove the first two rows by myself and then let Matlab read the table. But is it possible that one let Matlab read "visitors.xlsx" and delete the first two lines?

Accepted Answer

Image Analyst
Image Analyst on 6 Dec 2020
[~, ~, raw] = xlsread(filename);
raw = raw(3:end, :); % Extract starting at row #3.
Save it again if you want to.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!