How write multiple data output in excel sheet
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposta accettata
Image Analyst
il 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 Commenti
Image Analyst
il 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.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Spreadsheets in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!