MATLAB Answers


How can I load .tab file with header in MATLAB ?

Asked by S
on 14 May 2013

There is excel file in .tab format of size approximately 300MB, opening in excel using delimited data type after pressing next giving option of all delimiters and column data format as a general.Now data comes in excel sheet,now want to load this file in matlab, this also having headers & I also want to load .tab directly in MATLAB, How can I?



No products are associated with this question.

1 Answer

Answer by Walter Roberson
on 14 May 2013

xlsread() to read from the excel sheet.

textscan() with 'Delimiter', '\t' to read from the .tab directly.


Adapting an example from the online documentation for xlsread:

filename = 'myExample.xlsx';
sheet = 1;
header_xlRange = 'A:D';
[headers_nums, header_text] = xlsread(filename, sheet, header_xlRange);
body_xlRange = 'E:';   %I am not certain about this
body_nums = xlsread(filename, sheet, body_xlRange);
on 16 May 2013

1. ok but if I want to read a particular column not by whole column as A to D, suppose I want to read only A and C, so how can I read 2. Suppose there is date and time data in a particular column that is also creating problem so how can I read.

on 18 May 2013

How can I input several column which are not in a sequence like A:D.

Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!