The network path does not work for xlswritefig to Matlab

advertisements

I am trying to open a workbook that is located on a network path using the function xlswritefig. I.e. the path does not start with the traditional letter such as C:\. Instead it looks as follows:

\\networkmain\folder\to

When I try to open the excel file on this folder in Matlab, I noticed that Excel adds the current path in front of the the path. I.e. if I am currently in folder C:\Matlab\ then Excel tries to open:

C:\Matlab\networkmain\folder\to

How can I prevent this from happening and redirect to the network path?


The problem was with the function xlswritefig. To solve for this issue, step into the function and change the following line of code (line 86):

%**op = invoke(Excel.Workbooks, 'open', [pwd filesep filename]);
op = invoke(Excel.Workbooks, 'open', filename);

Thus remove the [pwd filesep] part.