hi there can anyone help me, i have problem in reading the excel file using the csvread command
2 次查看(过去 30 天)
显示 更早的评论
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/807984/image.jpeg)
4 个评论
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
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
2021-11-24
Hi,
Using "csvread" to read comma-separated value (CSV) file is not recommended.Use "readmatrix" instead.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!