Xlswrite, strfind, excel problem.
이전 댓글 표시
My excel file is been created as shown at "result.jpg".
I want something as shown at "WhatIWant.jpg"
The txt file is uploaded as "items.txt"
Thanks.
function x=testt()
fid = fopen('items.txt','r');
k=1;
while 1
tline = fgetl(fid);
if strfind(tline, 'AbilityCooldown')>0
x=strfind(tline, 'AbilityCooldown')
% tline(x:end)
sprintf('%s %f',tline)
my_cell = sprintf( 'A%s',num2str(k) );
xlswrite('testitens2.xlsx',tline,'Sheet1',my_cell);
k=k+1;
end
if ~ischar(tline)
break
end
end
end
채택된 답변
추가 답변 (1개)
Lucas Santana
2016년 12월 13일
카테고리
도움말 센터 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!