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

조회 수: 1 (최근 30일)
Collegue
Collegue 2017년 6월 26일
댓글: Jan 2017년 6월 26일
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