MATLAB engine, xlsread, compatibility issues

2 ビュー (過去 30 日間)
Caroline
Caroline 2013 年 8 月 18 日
I wrote an executable in C++ that uses the MATLAB engine to use the function xlsread to read a .xlsm file. It works perfectly on my computer, I am using Windows 7 and have MATLAB version R2012a however, I am trying to put it on a file server (Windows Server 2008 R2 Service Pack 1) and has MATLAB version R2013a. However, when I put it on the server the executable does not work correctly. Does anyone know why this might be happening?
Any feedback that anyone could provide would be extremely helpful.
Thanks!
  8 件のコメント
Walter Roberson
Walter Roberson 2013 年 8 月 21 日
and click on the description of the 'basic' option
Flag to request reading in basic mode, which is the default for systems without Excel for Windows. In basic mode, xlsread:
Reads XLS, XLSX, XLSM, XLTX, and XLTM files only.
Does not support an xlRange input when reading XLS files. In this case, use '' in place of xlRange.
Does not support function handle inputs.
Imports all dates as Excel serial date numbers. Excel serial date numbers use a different reference date than MATLAB® date numbers.
Caroline
Caroline 2013 年 8 月 22 日
Thank you!

サインインしてコメントする。

回答 (1 件)

Image Analyst
Image Analyst 2013 年 8 月 18 日
Did you also install the R2012a Runtime Component library on the server? It needs to have the same MCR on it that you used to compile your MATLAB module.
  3 件のコメント
Caroline
Caroline 2013 年 8 月 18 日
編集済み: Caroline 2013 年 8 月 18 日
Thanks so much for answering me! I installed a complete version of MATLAB (R2013a) on the file server. Do I also need the MCR? I thought I wouldn't need that if I had a fully installed version of MATLAB. The executable runs, it just does not run the way that it should. I used visual C++ to make the executable. I didn't use ActiveX in my code. The only things I used to communicate with MATLAB in my code was the MATLAB engine functions (engPutVariable(), engEvalString(), engGetVariable(), etc.)
Image Analyst
Image Analyst 2013 年 8 月 18 日
I'm not familiar with "the MATLAB engine". If you compiled some MATLAB code on your computer, then to access/run it on another computer, you'll need to install the MCR on that computer. If your code is talking to the full blown MATLAB development environment where MATLAB is acting as an ActiveX server, then you don't need to install the MCR.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeActiveX についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by