3 Replies Latest reply on Oct 16, 2017 8:29 AM by rjaiswal RSS
    rjaiswal Explorer

    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