How write multiple data output in excel sheet
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi All I want to get data from a serial port and stored in Excel sheet and i repeated this several times. but Every time a new value replaces in the previous value. but i need all the data. How do I store this data in a different sheet or file(Dynamic File Name). Regards
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 26 Feb. 2013
Have you looked up xlswrite() and seen how the arguments let you specify the sheet or the cell to write to?
2 Kommentare
Image Analyst
am 26 Feb. 2013
That tells me that you have not read the documentation, which says:
xlswrite(filename,A,sheet,xlRange) writes to the specified sheet and range, xlRange.
See the third argument, sheet? That is the name of the sheet. You could use 'This sheet' or 'That sheet' or 'Results' or 'Data' or whatever you want.
See the third argument, range? If you specify 'D42', it will put the upper left part of your array at cell D42, not A1.
If you don't specify the sheet, and don't use ActiveX, then it will blow away all prior contents on the first sheet. So if you want to keep those, then you need to use xlsread() to read in the current contents, and add your new data to that cell array, or else specify a different sheet.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Spreadsheets finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!