I want to read differently from xlsread as a uigetfile .csv

2 次查看(过去 30 天)
Hi. I wanto read differently from using xlsread to using uigetfile .csv.
For example if I use [num6 txt6 numtxt6]=xlsread('R6','B2:Q10001'); I will get the following in my workspace (right side):
num6 10,000x16 double numtxt6 10,000 x 16 cell txt6 0x0 cell
However if I use for instance [num6 txt6 numtxt6]=uigetfile('*.csv')
I do not get this info in the workspace. I want to get the same in uigetfile as i got in xlsread and get the same info on the workspace so that that I can apply a set of formula every time I want to open a file since I have several files in sequence R1, R2, R3 etc. Thank you.

回答(1 个)

Guillaume
Guillaume 2018-9-17
You request makes no sense. uigetfile does not read files. It prompts you to select a file and simply returns the name of the selected file. You can use csvread, dlmread even xlsread or some other low level function to read that file.
Even better, nowadays you have readtable that can read both excel files and csv files and is easier to use than xlsread.
You should read the documentation of the functions you use if you're not sure what they do.
  6 个评论
juan sanchez
juan sanchez 2018-9-17
编辑:juan sanchez 2018-9-17
Thank you very much. I greatly appreciate your advise. I promise I will study the functions in detail. I am very impressed with your high level of knowledge. How can I become good as you in MATLAB? I have no one to help me or where to go. What is the best way to learn or tips you can give me as where to go so I can master this MATLAB that seems so impossible to me. Thank you greatly!!!
juan sanchez
juan sanchez 2018-9-20
Hi Guillaume, is there any way I can read multiple excel files so the analysis is done the same way but with more than one excel time at a time?

请先登录,再进行评论。

Community Treasure Hunt

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

Start Hunting!

Translated by