How to Write Table to Excel with headers
16 次查看(过去 30 天)
显示 更早的评论
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 个评论
Peter Perkins
2015-6-3
Samantha, writetable (unless you tell it otherwise) does write the variable names as column headers in the spreadsheet. What headers are you looking for?
回答(1 个)
Salaheddin Hosseinzadeh
2015-6-3
Hi Samantha,
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 个评论
Image Analyst
2015-6-3
Tables and the associated functions like readtable() and writetable() came about in release R2013b I believe.
Salaheddin Hosseinzadeh
2015-6-3
编辑:Salaheddin Hosseinzadeh
2015-6-3
Alright!
I am using 2012a and it does not have writetable.
Thanks Image Analyst ;)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!