How can I have increment a counter when I push a buttom?

1 次查看(过去 30 天)
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 个评论
Collegue
Collegue 2017-6-26
Hello I want this:
I want to enter different parameters like Name Surname Telephone etc. and then, when I push a buttom to create a Excel with that data. After that I want to enter again data and save the information in the same Excel in another row.
Jan
Jan 2017-6-26
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.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Import from MATLAB 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by