Uses ActiveX commands to write data_n into range_n in an existing Excel spreadsheet. Inputs (excluding fileloc and promptforsave) must be paired.
As of 10/04 update, you may provide the target range (upper left cell to lower right cell) OR just the upper right cell. If the range is specified, the function will verify that the corresponding data block is the correct size, and give an error if not. (This may be useful for error checking, for instance.) If only the upper left cell is provided, write2excel will now compute the target range.
Additionally, you may now specify cells by address (eg., 'H3') OR row, column (eg, '[3,8]').
SEE ALSO: readfromexcel
Brett Shoelson (2021). write2excel (https://www.mathworks.com/matlabcentral/fileexchange/4414-write2excel), MATLAB Central File Exchange. Retrieved .
Thank you for the excellent code!
and one more thing: is there a way to give input information regarding the sheet one wants to be written to?
I know excel is evil and doesn't implement the NaN standard, but is there a way to get your program to write something sensible, like "-" or ".." to a cell when the data array has an NaN?
Right now it writes 65535 for me, which is far to close to a real number to be helpful.
Cheers and thanks for the great coding,
Why do I get this error message?
??? Error using ==> Write2Excel at 157
Sorry...unable to open file ./loss_summary_v11_IEDv11_20090827_1438.xls
I checked the file path, and the file exists.
Thanks a lot for your work.
It can be further improved if multiple sheets can be writen by just calling this function once as to function 'readfromexcel'. Thanks for this excellent work!
It's a good method to integrate datas of experiment to a computing software
Excellent program! Now Im storing thousands of graphs and results in predefined excel files. Excellent to share data with excel users. Thanks a lot!
excellent, just solved my problem! you are the best.
Very useful command, thx!
The only thing is that when i call this function, the program take like 30 secs tu run it, is there a way it can be faster??
the file woks fine, but exel exel shoul be a forbiden program for humans! SO this file just can be bad!
Really good file. Very versatile...
This is the best command. It makes life very easy.
I use this function all the time. Very handy and simple. Brett did a great job!
This is an excellent function. It is one of the essential functions I have used in writing a data aquisition script.
Wonderful - can't believe there wasn't capacity to do this already actually.
Beautiful piece of code
Very practical routine. Good effort.
excellent add-on for users running in a typical wintel environment! should be included in the basic package.
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!