hi there can anyone help me, i have problem in reading the excel file using the csvread command

조회 수: 1 (최근 30일)
  댓글 수: 4
dpb
dpb 2021년 11월 21일
Also recommend using readtable or one of the other more recent input functions instead of csvread
If the file contains anything other than numeric values, csvread is guaranteed to fail -- at most you can skip a header line, but it isn't smart enough to do that on its own.
Also, much easier for folks here if you paste the actual text instead of images and attachments -- if you're going to attach anything it would be more useful to have the input file so we could see its content.
Walter Roberson
Walter Roberson 2021년 11월 22일
If you know ahead of time what the file format is like, then csvread() can be used to skip any fixed number of leading rows, and any fixed number of leading entries, even when those rows or entries contain text. However, csvread() cannot be used to skip trailing rows or trailing or intermediate text columns.

댓글을 달려면 로그인하십시오.

답변 (1개)

Prateek Rai
Prateek Rai 2021년 11월 24일
Hi,
Using "csvread" to read comma-separated value (CSV) file is not recommended.Use "readmatrix" instead.
You can refer to readmatrix MathWorks documentation page to find more on this.

카테고리

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