Xlswrite and copy&paste uitable column names

조회 수: 1 (최근 30일)
as hz
as hz 2013년 2월 17일
Hi,
I have a uitable which I copy&paste and export. It does not paste the uitable column names to Excel. How can I do it?. Do I have to change something in the property inspector?
In addition, how do I also export also the uitable column names when I am saving the uitable data (using xlswrite).
Thanks

채택된 답변

Jan
Jan 2013년 2월 17일
Copy&Paste duplicates the marked contents, but the headers are not selected. Therefore I'd suggest am extra button or adding a context menu on the Java level. From there you can apply a method similar to Azzi's suggestion considering if the Data are stored as cell or double matrix.

추가 답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2013년 2월 17일
편집: Azzi Abdelmalek 2013년 2월 17일
col=get(t,'columnname')' % t is the handle of your table
data=get(t,'data')
num=[col;data]
xlswrite('file.xls',num)
  댓글 수: 5
Azzi Abdelmalek
Azzi Abdelmalek 2013년 2월 17일
You can delete your file before saving again.
delete([pathname filename])
as hz
as hz 2013년 2월 17일
Thanks.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by