I'm trying to open an Excel file to get and set some values. Unfortunately, I have no choice, I must to work with Excel.
Dim xAp As New Microsoft.Office.Interop.Excel.Application
Dim xWkb As Microsoft.Office.Interop.Excel.Workbook
xWkb = xAp.Workbooks.Open("c:\uploads\teste.xls")
Always I have this exception: (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))
Need I Excel installed in server machine to open Excel files? I don't think so, because when I create a new application and workbook throught code, all things go right, but... its a possibility...
Thanks for helping.
Yes, you need Excel installed on the server to open Excel files using COM Interop. It's not recommended, and I would recommend using a 3rd party library to access data in Excel files. You can also try and put the data into an easier-to-work with CSV, though you stated this might not be possible.
User contributions licensed under CC BY-SA 3.0