cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

How to read csv/excel file that reside on network path instead file repository

RohitKumar_Jais
4-Participant

How to read csv/excel file that reside on network path instead file repository

Hi,

 

I have some requirement like How to read csv/excel file that reside on network path instead File repository.

 

Example:

 

In below example you can see I want to read a csv file 'EmpDetails.csv' that reside under path 'C:/Users/NG6F868/Desktop' instead File Repository  'EDURepository' but I am getting error 'Wrapped com.thingworx.common.exceptions.InvalidRequestException: File Repository [C:/Users/NG6F868/Desktop] Does Not Exist Cause: File Repository [C:/Users/NG6F868/Desktop] Does Not Exist' when I test the service.

 

var params = {   
    path: 'EmpDetails.csv' /* STRING */,
columnMappings: 'FirstName,LastName,DOB' /* STRING */,
    hasHeader: true /* BOOLEAN */,
//longitudeField: undefined /* NUMBER */,
//dateFormat: undefined /* STRING */,*
    fileRepository: 'C:/Users/NG6F868/Desktop',
//fileRepository: 'EDURepository' /* THINGNAME */,
//latitudeField: undefined /* NUMBER */,
fieldDelimiter: ',' /* STRING */,
//stringDelimiter: undefined /* STRING */,
dataShape: 'EmpDetailsDataShape.csv' /* DATASHAPENAME */
};

// result: INFOTABLE
var result = Resources["CSVParserFunctions"].ReadCSVFile(params);

 

 

Is there any way to fix this issue and fulfil my requirements?

 

Please do the needful as soon as possible.

 

 

From,

 

Rohit Kumar Jaiswal

0 REPLIES 0
Top Tags