xlswrite fails to write an excel file when a Matlab process is ran from Jenkins.
Show older comments
We have a series of tests here that puts their results into an excel spreadsheet. We have been running these test for a few years by hand inside of a Matlab interactive session. I have been brought in to automate the process and I have set up jenkins and configured a jenkins job to run the matlab session on a local test server.
1) I can log into the system start up a matlab session and the tests will run fine and the excel spreadsheets get created correctly.
2) The jenkins client process on the test server is running as a service using my name and password.
3) When running under Jenkins the same set of tests will fail withe the following exception:
pre-formated
Error using xlswrite (line 220)
Invoke Error, Dispatch Exception:
Source: Microsoft Excel
Description: SaveAs method of Workbook class failed
Help File: xlmain11.chm
Help Context ID: 0
I debug the code and it appears that the Excel datatype is getting created and then a empty workbook is added. Then when the saveas is done it fails. If anyone has any ideas on what is going on, I appreciate it.
MATLAB Version: 8.1.0.604 (R2013a)
Operating System: Microsoft Windows 7 Version 6.1 (Build 7601: Service Pack 1)
Java Version: Java 1.6.0_17-b04 with Sun Microsystems Inc. Java HotSpot(TM) Client VM mixed mode
------------------------------------------------------------------------------------------------
MATLAB Version 8.1 (R2013a)
Embedded Coder Version 6.4 (R2013a)
MATLAB Coder Version 2.4 (R2013a)
MATLAB comment stripping toolbox Version 1.0
Signal Processing Toolbox Version 6.19 (R2013a)
>>
2 Comments
Walter Roberson
on 17 Jun 2015
Is it possible that the jenkins job is in a different directory than you expect and you have not given a full path for the file to save?
Joe Davis
on 18 Jun 2015
Accepted Answer
More Answers (0)
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!