Monday, November 30, 2015

Warning: Could not start Excel server for export - Use xlwrite

Update 04/12/15 - The following steps will add xlwrite and its jar files to Matlab dynamic path. However, you will have to redo the steps again every time you restart Matlab. To go about this, add the jar files to Matlab static path. Check here.

I can use xlsread in Matlab for Mac successfully, however using xlswrite gives me the following error:


After some googling and trying on csvwrite, I find another code on Mathworks. I strongly suggest those out there that hesitate to use csvwrite to give this a try.

This pic-post will walk you through on how to use xlwrite.

Step 1:
1. Download xlwrite .

2. Unzip it and put all the files in your designated folder. (I'm a digital-organised freak).

Content of your downloaded files.

3. We want to know the path to all this POI files. On Mac, click cmd+i.
cmd+i to get the information of the files


4. In Matlab command windows, use javaaddpath to add all the needed jar files.

Or you can add 'xlwrite' to Matlab path. 




That's all. You can see 'test_xlwrite.xlsx' is created in your current folder.

See file xlwrite or go to <url> for full license details.

No comments:

Post a Comment