Comments on: Saving Data from MATLAB to Excel Using a Template https://blogs.mathworks.com/videos/2016/03/28/saving-data-from-matlab-to-excel-using-a-template/?s_tid=feedtopost Stuart uses video to share his experiences solving problems with MATLAB day-to-day, interesting new features, plus tips and tricks he has picked up along the way. Wed, 15 May 2019 23:40:02 +0000 hourly 1 https://wordpress.org/?v=6.2.2 By: Stuart McGarrity https://blogs.mathworks.com/videos/2016/03/28/saving-data-from-matlab-to-excel-using-a-template/#comment-98111 Wed, 15 May 2019 23:40:02 +0000 https://blogs.mathworks.com/videos/?p=1872#comment-98111 Hi Ernesto,

I think that is covered in this video: https://blogs.mathworks.com/videos/2017/07/12/developing-a-function-that-replicates-an-excel-worksheet-template/

]]>
By: Ernesto https://blogs.mathworks.com/videos/2016/03/28/saving-data-from-matlab-to-excel-using-a-template/#comment-98109 Wed, 15 May 2019 22:12:54 +0000 https://blogs.mathworks.com/videos/?p=1872#comment-98109 Hi Stuart. Thanks for your video. I have a question more. How can I copy only one sheet and paste it into another excel keeping the template?

]]>
By: Stuart McGarrity https://blogs.mathworks.com/videos/2016/03/28/saving-data-from-matlab-to-excel-using-a-template/#comment-86510 Mon, 12 Nov 2018 16:01:03 +0000 https://blogs.mathworks.com/videos/?p=1872#comment-86510 Yes. I have requested that this be added as an option.

]]>
By: Lucie SOMAGLINO https://blogs.mathworks.com/videos/2016/03/28/saving-data-from-matlab-to-excel-using-a-template/#comment-86504 Mon, 12 Nov 2018 09:07:59 +0000 https://blogs.mathworks.com/videos/?p=1872#comment-86504 Hi Stuart,
Thanks a lot for your quick answer. That’s works great now!
Too bad they didn’t make it as an option to the function…

]]>
By: Stuart McGarrity https://blogs.mathworks.com/videos/2016/03/28/saving-data-from-matlab-to-excel-using-a-template/#comment-86458 Fri, 09 Nov 2018 13:52:31 +0000 https://blogs.mathworks.com/videos/?p=1872#comment-86458 Hi Lucie,

In a recent release of MATLAB a feature was introduced that auto-adjusts the column widths to match the data. To stop this, the only current option is to comment out a line in writeXLSFile.m in your MATLAB installation (or provide a function to override it):
:
* Start MATLAB as administrator
* edit writeXLSFile.m
* Search for “autoFit”, then comment it out like,
* %sheetObj.autoFitColumns(writeRng);

]]>
By: Lucie SOMAGLINO https://blogs.mathworks.com/videos/2016/03/28/saving-data-from-matlab-to-excel-using-a-template/#comment-86456 Fri, 09 Nov 2018 11:07:56 +0000 https://blogs.mathworks.com/videos/?p=1872#comment-86456 Hi, thanks for the great video, it’s very useful. Everything works great for me except the width of the columns that doesn’t stay when I copy the table to the formatted file (I do exactly the same as you do). Have you or somebody ever experienced this? Any solution?
Thanks in advance,

]]>
By: Stuart McGarrity https://blogs.mathworks.com/videos/2016/03/28/saving-data-from-matlab-to-excel-using-a-template/#comment-61991 Tue, 10 May 2016 18:02:15 +0000 https://blogs.mathworks.com/videos/?p=1872#comment-61991 Hi Oren, Good to hear from you. I agree, I’d like something like what you describe. I passed your idea on to others looking at this area.

]]>
By: Oren Rosen https://blogs.mathworks.com/videos/2016/03/28/saving-data-from-matlab-to-excel-using-a-template/#comment-61989 Tue, 10 May 2016 16:52:51 +0000 https://blogs.mathworks.com/videos/?p=1872#comment-61989 Thanks for the video Stuart. I am constantly writing data to Excel and formatting columns, freezing panes etc., but rarely do I have the same number and order of columns, so templates are a limited solution. What I would recommend as a valuable addition to MATLAB would be to allow for automatic formatting of columns via COM as you mentioned, with individual column formats specified in table properties similar to what something like sprint uses, i.e. %s, %0.2f, etc. I have built a solution like this for our internal use for writing dataset arrays to html tables that can automatically be included via cell mode publishing and it is quite useful.

]]>