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

4 views (last 30 days)
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.

Answers (1)

Guillaume
Guillaume on 17 Sep 2018
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 Comments
juan sanchez
juan sanchez on 20 Sep 2018
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?

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!