AnsweredAssumed Answered

XPRD usage with remoet access to Excel file

Question asked by Zhuo Liu on Jul 11, 2012
Latest reply on Aug 6, 2014 by

Regarding the remote invocation through XPRD and access to Excel data source, hope your team could provide more technical details. Following the samples in XPRD documents, I did some test and got error messages during Java running time, "Mosel: E-22: I cannot open file `mmodbc.excel:InData.xls' for reading (OLE-1004:'C:\Windows\TEMP\

xprm_2248\InData.xls' could not be found. Check the spelling of the file name, and verify that the file location is correct". 

The core code is as follows:
 XPRD xprd=new XPRD();
 XPRDMosel mosInst=null;
 XPRDModel modRP=null;
 String NODENAME = "localhost";                       
 mosInst.compile("", "rmt:budgetplanning.mos", "tmp:bpm.bim");                          
 modRP=mosInst.loadModel("tmp:bpm.bim");                ; 
However, If NODENAME is changed to empty (""), the model could find the required Excel file and be executed with expected results. I was pondering whether remote connection was built through XPRD/TCP if current node was set.  

My original idea was to store mosel and Excel files in the end-user's computer, who will trigger the remote execution through Java. According to suggestion - maintain the Excel file on network drive, does it mean that the excel file should be shared and accessed by the host machine with Xpress installed? if so, where should the file be put in xpress machine? Could we load the excel file into remote mosel instance through XPRD?

Would appreciate it if you can help resolve this challenge and move the project forward.