I am trying to convert excel to ITable in ArcGIS (10.2.2) SOE. I am using the below code for converting.
Type factoryType = Type.GetTypeFromProgID( "esriDataSourcesOleDB.ExcelWorkspaceFactory");
IWorkspaceFactory workspaceFactory = (IWorkspaceFactory)Activator.CreateInstance(factoryType);
IWorkspace workspace = workspaceFactory.OpenFromFile(@"E:\apps\DevelopmentArea\test.xls", 0);
IFeatureWorkspace featureWorkspace = (IFeatureWorkspace)workspace;
ITable table = featureWorkspace.OpenTable("Sheet1$");
I am getting the error in OpenfromFile method , arcgis server and the SOE projects are in same system.
Error message : Exception from HRESULT: 0x80040213
I checked in the net i could find any help. Kindly provide your suggestion
Has the user 'arcgis' privileges ntfs open file test.xls ?
I checked the ' folder security' Everyone is having full access . I am not sure how to set it for 'arcgis' user , can you tell me how to do that.
The same code I wrote in console application it worked for me , the only problem I am facing in ArcGIS soe . In console application I added the below three lines of code.
the user that impersonation arcgis server 'soe' (see ArcGIS for Server Installation Guide - The ArcGIS Server account ) is arcgis server account.
if you use code in console you are using the current user.
Thanks for the information .
I identified the arcgis user and gave the full permission , still i am facing same error mrssage.
Thanks for the information.