Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
Hi,
I am getting access denied error while reading CSV file.
Steps Perform to reach this,
After that I am getting Error as
"Unable To Open [/] in [GetCSVDetails] : \ThingworxStorage\repository\GetCSVDetails (Access is denied)"
Attached is the screen shot.
Regards,
Mahesh Lohokare
Solved! Go to Solution.
Firstly you check the csv file resides in the repository thing you created using the service GetFileListing to male sure
Then to test ReadCsvFile you need to set correct path .. i think you are giving the whole path as like
repository/Repositorything/store instead you give path /store/Book6.csv and give it a go !
Hope this helps !
Firstly you check the csv file resides in the repository thing you created using the service GetFileListing to male sure
Then to test ReadCsvFile you need to set correct path .. i think you are giving the whole path as like
repository/Repositorything/store instead you give path /store/Book6.csv and give it a go !
Hope this helps !
Hi Nilesh,
Thanks.
Now I am able to read my csv file.
Regards,
Mahesh
Hi Mahesh,
Could you load the content to grid???
Regards,
Hariprasadh
Hi Hariprasadh,
I am able show my CSV data into grid on Mashup with onload.
It was dummy data and can be viewed as attached image here.
Regards,
Mahesh
Exactly Mahesh... This is what I wanted... Can you please explain how you passed the data from csv service to grid.(Javascript service). Coz, I got exceptions like datashape must be specified.
Hi,
I followed below steps,
Set Local (JavaScript)
Base type - Infotable
DataShape - Shape name
Infotable type - Just Infotable
Use CSVParserFunction
in Script Area I have written as below -
var params = {
path: "/test.csv" /* STRING */,
columnMappings: undefined /* STRING */,
hasHeader: undefined /* BOOLEAN */,
longitudeField: undefined /* NUMBER */,
dateFormat: undefined /* STRING */,
fileRepository: "GetCSVDetails" /* THINGNAME */,
latitudeField: undefined /* NUMBER */,
fieldDelimiter: undefined /* STRING */,
stringDelimiter: undefined /* STRING */,
dataShape: "GetCSVDataShape" /* DATASHAPENAME */
};
// result: INFOTABLE dataShape: "undefined"
var result = Resources["CSVParserFunctions"].ReadCSVFile(params);
Add Grid
Add Entity
Assign All Data to Grid with Mashup Loaded property
Note: I have kept my CSV file into following location
"DRIVE:\ThingworxStorage\repository\GetCSVDetails\File"
Hope this will help you.
Regards,
Mahesh
Thank you so much!!
Hi Nilesh,
whn i try to read my csvfile as you said appears to me:
Unable to Invoke Service ReadCSVFile on CSVParserFunctions : Unable To Convert From java.lang.String to NUMBER
Do you know why?
Than's so much!
Hey
First you check all the fields in datashape you have binded (mapping) are of same type (same name as header as well as type) to the field which
you are parsing through ReadCSVFile follow this Keri Wright suggested solution . In this case the error you are facing is the type error
of the datashape fields you have binded to the data which is coming through CSV ,one of fields of CSV field is string type but you have binded the field as
number(Base Type)
If you are still facing the problem, you may try to store a simple CSV in repository and then bind datashape of same fields and give it a go ! Let me know for any help
Thank you Nilesh.
Tomorrow i will try it.
Hi Maurizio,
How did you resolve this issue : "Unable To Convert From java.lang.String to NUMBER". I am facing the same issue but couldn't find any workaround?
Can you please tell me what solution you have applied. I have float values in my CSV file and I have Number columns in DataShape but I keep receiving this error.
Regards,
Neetu