Note that there are some explanatory texts on larger screens.

plurals
  1. POOpen a excel file through Com-interop C# API on microsoft HPC
    primarykey
    data
    text
    <p>I'm working on a Windows <a href="/questions/tagged/hpc" class="post-tag" title="show questions tagged 'hpc'" rel="tag">hpc</a> and I'm trying to make a small program which run <a href="/questions/tagged/excel" class="post-tag" title="show questions tagged 'excel'" rel="tag">excel</a>'s macro on the grid. I'm using the Com Interop API <br/> It works fine on my computer, it runs the different VBA macros, but when I'm using it on the grid, it doesn't work anymore. The Open method doesn't work properly.</p> <pre class="lang-cs prettyprint-override"><code>workBook = excelApp.Workbooks.Open(path, Type.Missing,false, Type.Missing, Type.Missing, Type.Missing, true, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); </code></pre> <p>Here is the exception translated from french :</p> <blockquote> <p>Exception Found: Type: System.Runtime.InteropServices.COMException Message: Microsoft Office Excel can't access the file</p> <p>\server\path\test.xls. There is multiple possibilities :</p> <ul> <li>The file's name or the path doesn't existe</li> <li>The file is currently used par another program </li> <li>The workbook you are trying to use has the same name of another workbook already open</li> </ul> <p>Source: Microsoft Office Excel</p> <p>Stacktrace: at Microsoft.Office.Interop.Excel.Workbooks.Open(String Filename, Object UpdateLinks, Object ReadOnly, Object Format, Object Password, Object WriteResPassword, Object IgnoreReadOnlyRecommended, Object Origin, Object Delimiter, Object Editable, Object Notify, Object Converter, Object AddToMru, Object Local, Object CorruptLoad) at namespace.ExcelFile.readExcel(Application excelApp) in E:\path\ExcelFile.cs:line 37</p> </blockquote> <p>I've tried to access the file from the compute node with the same account as the one used in the application and it works fine. I can access it, it seems that there is no other program using it, and Excel is not open. <br/> Edit : I also can run my small application on the compute node without using the Microsoft API (head node) <br/><br/> What am I missing ?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload