How can I have increment a counter when I push a buttom?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi! I want to increment a counter and then use it to text on an Excel file. What I mean is that when I press the buttom Safe for examen Counter=1 so, in excel it would appear 1 Maria. When I press again the buttom again, it would appear in the same excel, another row 2 Maria
3 commentaires
Jan
le 26 Juin 2017
This would be easy if "Excel file" means a CSV file and you simply append a new row. But if it is an open Excel session and you want to append a row to an existing spreadsheet, you have to import it at first to know the current size. This is not trivial.
The Matlab-Excel-Interaction is tedious. If you are not an experienced programmer with much spare time, I'd suggest to solve this either directly in Excel (which might be trivial) or to stay at Matlab and export the Excel file at the end only - if it is really required. (Sorry, I hate Excel.)
Currently the description is still too vague for an explicite code suggestion.
Réponses (0)
Voir également
Catégories
En savoir plus sur Data Import from MATLAB dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!