フィルターのクリア

Excel Data with Column Names

146 ビュー (過去 30 日間)
Preetam Pal
Preetam Pal 2015 年 8 月 17 日
回答済み: Pruthvi G 2020 年 4 月 13 日
Hi, I need to read data from an excel file in which each column has a heading. The command 'xlsread' only fetches the data, without the column names. Thanks, Preetam

回答 (2 件)

Star Strider
Star Strider 2015 年 8 月 17 日
編集済み: Star Strider 2015 年 8 月 17 日
Actually, xlsread fetches everything, and will give it to you if you ask it to. To get all the string data, including column names, ask for a second output:
[d,s] = xlsread('file.xls')
The string data are in the ‘s’ output.
EDIT — If you have R2013b or later, the readtable function will import the Excel file data and create a table with the column names automatically.
  1 件のコメント
Anurag Pujari
Anurag Pujari 2017 年 1 月 7 日
Thanks

サインインしてコメントする。


Pruthvi G
Pruthvi G 2020 年 4 月 13 日
%%********************************************************************************
% Name : xl_xlsfinfo
% Author : Pruthvi Raj G
% Version : Version 1.0 - 2011b Compactible
% Description : Finds all the sheets in the Excel file (.xls,.xlsm,.xlsx)
% Input : File_Name with path included.
% Date : 11-Feb-2020
%
% Examples : xl_xlsfinfo('D:\Pruthvi\Test_file.xls')
%*********************************************************************************
Use the Below Lines of Code ::
sheets = xl_xlsfinfo('D:\Pruthvi\Test_file.xls')
sheets =
1×5 cell array
{'Sheet1'} {'Sheet2'} {'Sheet3'} {'Sample'} {'Data'}

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by