xlswrite doesn't work when passing on Matlab 2013
1 回表示 (過去 30 日間)
古いコメントを表示
Hello everyone, I used xlswrite to create excel file as normally. I've used Matlab v2011, and the code works well until I made a try on Matlab 2013 with the same lines of code. This time, with v2013, excel files wasn't created, there was no errors, so I'm very confused because xlswrite is supposed to work on 2013 as weel as 2011, isn't it ?
%%--------------Ecriture des matrices dans un .xls------------------------
% % Ouverture de l'application Excel
Excel = actxserver('Excel.Application') ;
% % Ouverture du fichier Excel source
[~,~] = xlswrite([cd '.\Datas_final_xls',filesep,'Pts_fct_Bat_',datestr(now,29),'.xls'],tableau_cell,'MAT ALL','B4') ;
[~,~] = xlswrite([cd '.\Datas_final_xls',filesep,'Pts_fct_Bat_',datestr(now,29),'.xls'],tableau_cell_R,'DECH kWhcell','B4') ;
[~,~] = xlswrite([cd '.\Datas_final_xls',filesep,'Pts_fct_Bat_',datestr(now,29),'.xls'],tableau_cell_check,'Bilan 4 check','B4') ;
if S.Save_SIM_option == 2
[~,~] = xlswrite([cd '.\Datas_final_xls',filesep,'Pts_fct_Bat_',datestr(now,29),'.xls'],tableau_cell_RC,'MAT RC','B4') ;
[~,~] = xlswrite([cd '.\Datas_final_xls',filesep,'Pts_fct_Bat_',datestr(now,29),'.xls'],tableau_cell_P,'MAT P','B4') ;
[~,~] = xlswrite([cd '.\Datas_final_xls',filesep,'Pts_fct_Bat_',datestr(now,29),'.xls'],tableau_cell_CR,'CR kWhcell','B4') ;
[~,~] = xlswrite([cd '.\Datas_final_xls',filesep,'Pts_fct_Bat_',datestr(now,29),'.xls'],tableau_cell_CL,'CL kWhcell','B4') ;
[~,~] = xlswrite([cd '.\Datas_final_xls',filesep,'Pts_fct_Bat_',datestr(now,29),'.xls'],tableau_cell_recup,'recup kWhcell','B4') ;
end
Do you know what could be the problem please ? Thanks a lot
0 件のコメント
回答 (1 件)
Shameer Parmar
2016 年 6 月 23 日
Try removing all ' [~,~]' from xlswrite() coammnd.. and run the code..
2 件のコメント
Shameer Parmar
2016 年 6 月 23 日
ok.. in your provided path for excel file, dot (.) is there.. I guess that is the issue..
Try removing that dot (.) and check..
In this string.. in between 'cd' and backslash(\)..
[cd '.\Datas_final_xls',filesep,'Pts_fct_Bat_',datestr(now,29),'.xls']
参考
カテゴリ
Help Center および File Exchange で Spreadsheets についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!