필터 지우기
필터 지우기

Include data in excell

조회 수: 2 (최근 30일)
Alexandros
Alexandros 2011년 11월 18일
Hi
I have 3 cell data from matlab that have to be include in excel.
Now the problem is that i want to include the 3 cell data at the first cell of the row that is not already written. This meaning if in excell there is
A1(cell) = 1
A2(cell) = 2
I want to write a script that understands that A1 and A2 cell are already with data and should add the new 3 cell data after the A2 cell (in excel).
I hope you understand what i am talking about. I was thinking of reading first the whole row in a Boolean way and see what are 0 and 1 but then I have a problem of how to tell matlab where he should start to put the data in?
  댓글 수: 1
Alexandros
Alexandros 2011년 11월 18일
Maybe i can do a boolean variable then find the length of it and i can add it to the first cell of my excel file. So if the length is 0 then i will start to the first cell. But how do I add to the cell number the length of the boolean variable and still be a cell identification.

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

채택된 답변

Titus Edelhofer
Titus Edelhofer 2011년 11월 18일
Hi Alexandros,
what about the following:
% read the file
[~,~,data] = xlsread('yourfile.xls');
% add at the end your data
data{end+1,1} = 42.0;
% and write the result back to your file:
xlswrite('yourfile.xls', data);
If you need to add more then just one number use [] or indices or something similar ...
Titus

추가 답변 (1개)

Alexandros
Alexandros 2011년 11월 18일
i found the answer
I did a map of all the possible cells that can be found in excell thus i can directly related with it in my matlab code and put things where i need them

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by