How to prevent xlswrite to overwrite the present values?
2 views (last 30 days)
Show older comments
Hello Everyone, I have some variables which need to get copied in an excel sheet. The variables gets changed every time I execute the program.Now when I try it with the XLSWRITE it over writes the previous value, but I need to retain the previous value and need to store the new value after the previous or old value in a specific column. How to do that? It will be much helpful if we are able to store the variables in a specific columns of an excel sheet. Say for variable A i should be able to store it in A1, B in B1 etc... Thanks in advance
3 Comments
Walter Roberson
on 5 Apr 2017
Give a different xlRange option the next time.
Notice the hint:
If you do not specify sheet, then xlRange must include both corners and a colon character, even for a single cell (such as 'D2:D2'). Otherwise, xlswrite interprets the input as a worksheet name (such as 'D2').
Answers (1)
Walter Roberson
on 5 Apr 2017
"xlswrite(filename,A,xlRange) writes to the rectangular region specified by xlRange in the first worksheet of the workbook. Use Excel range syntax, such as 'A1:C3'."
0 Comments
See Also
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!