How to Write Table to Excel with headers

22 views (last 30 days)
Samantha Brand
Samantha Brand on 3 Jun 2015
Hello. I need to write a table from within matlab to an excel sheet. Right now, this is the code I have:
writetable(Check_AirTemp, filename,'Sheet', 3)
Where the table being inputted has columns and rows. I am looking to the best way to add column headers in excel for each of the three columns in the Check_AirTemp table.
2 Comments
Samantha Brand
Samantha Brand on 5 Jun 2015
I'm looking for column headers, not just the variable name (which I already have as the title of the columns) what is the best function for that.

Sign in to comment.

Answers (1)

Salaheddin Hosseinzadeh
Salaheddin Hosseinzadeh on 3 Jun 2015
嗨,萨曼塔,
I usually use xlswrite() which then I add the headers as soon as I generate the file.
You can give it a try if you like, I haven't heard of writetable() in fact!
2 Comments
Salaheddin Hosseinzadeh
Salaheddin Hosseinzadeh on 3 Jun 2015
Alright!
I am using 2012a and it does not have writetable.
Thanks Image Analyst ;)

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!