xlsread/write errors when matlab is run via a background task, spawning many officec2rclient processes

2 次查看(过去 30 天)
I have an automated data processing tool that's triggered via a bat file, called as a background process from task scheduler. An error is created during MS Office activeX activity. This error is accompanied by a proliferation of officec2rclient processes, sometimes into the hundreds, which must be manually killed. I see neither the error, nor click2run processes when the task is set to run in the foreground, which is unacceptable as I can't stay permanently logged into the server.
Here is a sample error message, which has been caught by one of the many try/catch blocks I utilize.
Automation 5.0.11, Packaged 28 Feb 2018, Decoder 2.28, Matlab 9.2.0.538062 (R2017a)
**** MidZ_915_MY19_030 ************************
No new files found
**** LWFM_Osprey_6700A_703 ************************
Copying LWFM_Osprey_6700A_703_20180301_042538.zip
Copying LWFM_Osprey_6700A_703_20180301_050800.zip
2 files downloaded: 2.9 sec
Decoding Tool:
files decoded: 3.4 sec
0 DTC emails sent: 0.1 sec
1 concatenated files created: 2.0 sec
Post Processing S3T Files:
1 s3t_cat files processed: 0.4 sec
1 pp_s3t_cat files copied to location -1: 0.5 sec
1 pp_s3t_cat files copied to location -2: 0.2 sec
Reports Processing:
Error in XLS Summary Report
ans =
'Error using <a href="matlab:matlab.internal.language.introspective.errorDocCallback('xlswrite', 'C:\Program Files\MATLAB\R2017a\toolbox\matlab\iofun\xlswrite.m', 194)" style="font-weight:bold">xlswrite</a> (<a href="matlab: opentoline('C:\Program Files\MATLAB\R2017a\toolbox\matlab\iofun\xlswrite.m',194,0)">line 194</a>)
An error occurred on data export in CSV format.
Error in <a href="matlab:matlab.internal.language.introspective.errorDocCallback('MGDL.dm_reports/load_summary_data', 'E:\_Server\_Automation V5\_Scripts\+MGDL\@dm_reports\dm_reports.m', 583)" style="font-weight:bold">MGDL.dm_reports/load_summary_data</a> (<a href="matlab: opentoline('E:\_Server\_Automation V5\_Scripts\+MGDL\@dm_reports\dm_reports.m',583,0)">line 583</a>)
xlswrite(obj.xlsfile,tmp_txt,'Summary','C1');
Error in <a href="matlab:matlab.internal.language.introspective.errorDocCallback('MGDL.dm_reports', 'E:\_Server\_Automation V5\_Scripts\+MGDL\@dm_reports\dm_reports.m', 66)" style="font-weight:bold">MGDL.dm_reports</a> (<a href="matlab: opentoline('E:\_Server\_Automation V5\_Scripts\+MGDL\@dm_reports\dm_reports.m',66,0)">line 66</a>)
obj = obj.load_summary_data(Dp);
Error in <a href="matlab:matlab.internal.language.introspective.errorDocCallback('process_control', 'E:\_Server\_Automation V5\_Scripts\process_control.m', 53)" style="font-weight:bold">process_control</a> (<a href="matlab: opentoline('E:\_Server\_Automation V5\_Scripts\process_control.m',53,0)">line 53</a>)
Dr = MGDL.dm_reports(Dp);
Caused by:
Error using <a href="matlab:matlab.internal.language.introspective.errorDocCallback('dlmwrite', 'C:\Program Files\MATLAB\R2017a\toolbox\matlab\iofun\dlmwrite.m', 104)" style="font-weight:bold">dlmwrite</a> (<a href="matlab: opentoline('C:\Program Files\MATLAB\R2017a\toolbox\matlab\iofun\dlmwrite.m',104,0)">line 104</a>)
The input cell array cannot be converted to a matrix.'
**** LWFM_Osprey_6080A_001 ************************
Copying LWFM_Osprey_6080A_001_20180301_042501.zip
1 files downloaded: 2.1 sec
Decoding Tool:
files decoded: 1.7 sec
0 DTC emails sent: 0.0 sec
1 concatenated files created: 1.7 sec
Post Processing S3T Files:
1 s3t_cat files processed: 0.1 sec
1 pp_s3t_cat files copied to location -1: 0.2 sec
1 pp_s3t_cat files copied to location -2: 0.1 sec
Reports Processing:
Error in XLS Summary Report
ans =
'Error using <a href="matlab:matlab.internal.language.introspective.errorDocCallback('xlswrite', 'C:\Program Files\MATLAB\R2017a\toolbox\matlab\iofun\xlswrite.m', 194)" style="font-weight:bold">xlswrite</a> (<a href="matlab: opentoline('C:\Program Files\MATLAB\R2017a\toolbox\matlab\iofun\xlswrite.m',194,0)">line 194</a>)
An error occurred on data export in CSV format.
Error in <a href="matlab:matlab.internal.language.introspective.errorDocCallback('MGDL.dm_reports/load_summary_data', 'E:\_Server\_Automation V5\_Scripts\+MGDL\@dm_reports\dm_reports.m', 583)" style="font-weight:bold">MGDL.dm_reports/load_summary_data</a> (<a href="matlab: opentoline('E:\_Server\_Automation V5\_Scripts\+MGDL\@dm_reports\dm_reports.m',583,0)">line 583</a>)
xlswrite(obj.xlsfile,tmp_txt,'Summary','C1');
Error in <a href="matlab:matlab.internal.language.introspective.errorDocCallback('MGDL.dm_reports', 'E:\_Server\_Automation V5\_Scripts\+MGDL\@dm_reports\dm_reports.m', 66)" style="font-weight:bold">MGDL.dm_reports</a> (<a href="matlab: opentoline('E:\_Server\_Automation V5\_Scripts\+MGDL\@dm_reports\dm_reports.m',66,0)">line 66</a>)
obj = obj.load_summary_data(Dp);
Error in <a href="matlab:matlab.internal.language.introspective.errorDocCallback('process_control', 'E:\_Server\_Automation V5\_Scripts\process_control.m', 53)" style="font-weight:bold">process_control</a> (<a href="matlab: opentoline('E:\_Server\_Automation V5\_Scripts\process_control.m',53,0)">line 53</a>)
Dr = MGDL.dm_reports(Dp);
Caused by:
Error using <a href="matlab:matlab.internal.language.introspective.errorDocCallback('dlmwrite', 'C:\Program Files\MATLAB\R2017a\toolbox\matlab\iofun\dlmwrite.m', 104)" style="font-weight:bold">dlmwrite</a> (<a href="matlab: opentoline('C:\Program Files\MATLAB\R2017a\toolbox\matlab\iofun\dlmwrite.m',104,0)">line 104</a>)
The input cell array cannot be converted to a matrix.'
And a pict of the processes

回答(0 个)

产品

Community Treasure Hunt

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

Start Hunting!

Translated by