Problem writing to excel using xlswrite. Can't Find excel server

1 view (last 30 days)
While exporting using xlswrite, MATLAB gives the error:
Warning: Could not start Excel server for export. XLSWRITE will attempt to write file in CSV format.
The cvs output is only a small part of what should be output. Works using IUanyware(online student access) which is what I used to write the code but now with my own computer and a Student version of MATLAB and not having access to that I can't get it to work. I have MATLAB R2018A Student with no add-ons and Excel 2016. Looking at other questions it's been a result of them having a MAC mine is a HP Windows10.
I've also tried using 'actxserver' and 'actxGetRunningServer' and had no results, not sure how to use these to resolve if that's the right approach.
for configuration = 1:Number_of_Configurations
datapoint = datapoint +1;
Table_Systems_Baseline(datapoint,1) = Solar_Panel_Range(configuration);
Table_Systems_Baseline(datapoint,2) = mean(Average_Battery(configuration,:));
Table_Systems_Baseline(datapoint,3) = mean(Average_LOPVG_count(configuration,:,:));
Table_Systems_Baseline(datapoint,4) = mean(Average_LOPVG_loss(configuration,:,:));
Table_Systems_Baseline(datapoint,5) = mean(Average_PV_Utilization(configuration,:,:));
Table_Systems_Baseline(datapoint,6) = mean(Average_Panel_Cost(configuration,:,:));
Table_Systems_Baseline(datapoint,7) = mean(Average_Battery_Cost(configuration,:,:));
Table_Systems_Baseline(datapoint,8) = mean(Average_Capital_Cost(configuration,:));
end
%Writes to the excel file outside of 'For' loop to speed up process.
Column_Names_Systems = {'Solar Panels','Average Batteries','Average LOPVG Count','Average LOPVG loss','Average PV Utilization','Average Cost for Solar Panels','Average Cost for Batteries','Average Capital Cost'};
xlswrite(SAPV_Analysis,Column_Names_Systems,'Baseline','X1')
xlswrite(SAPV_Analysis,Table_Systems_Baseline,'Baseline','X2')
  3 Comments
David Vance
David Vance on 6 Jun 2018
Edited: David Vance on 6 Jun 2018
I use the SAPV_Analysis to change the filename on each iteration. The .CSV format is not okay because the table is 100 x 9 on 3 different pages and only part of one page is being output. The filename is writable.
For example,
%Excel File Name
SAPV_Analysis = 'San_Antonio_20Systems_10Trials_45hours.xlsx';
David Vance
David Vance on 6 Jun 2018
>> which actxserver
C:\Program Files\MATLAB\R2018a\toolbox\matlab\winfun\actxserver.m

Sign in to comment.

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!