Dear visitor, despite all the challenges, our team continues operating at full speed.

We are ready to help with any questions you may have. Please fill out this quick form and we'll get back to you.

Fill the form
Get Free Trial

How to connect .csv from index.html

Medjber asked on May 16, 2018

I’m trying to connect a .csv file from my computer (local), by index.html.
Part of my code :

 var pivot = new Flexmonster({
container: "pivotContainer",
toolbar: true,
report: {
dataSource: {
filename: "file:///C:/Users/amedjber/Desktop/FlexMonster%20Trial/Pivot%20Table%20for%20CSV/client/123.csv"

The error I get when I try to load index.html :
Unable to open file file:///C:/Users/amedjber/Desktop/FlexMonster%20Trial/Pivot%20Table%20for%20CSV/client/123.csv?424017529.

It seems that this file doesn’t exist or ‘Access-Control-Allow-Origin’ header is absent in the resource requested.

Thank you, Medjber

4 answers

Tanya Gryshko Flexmonster May 16, 2018

Hello, Medjber,
Thank you for writing to us.
Browser security policy is causing this error. It doesn’t allow our component accessing the local file. We suggest putting both index.html and .csv files on the web server like http://localhost. Then set the relative path to .csv in filename property.
Does the suggested approach work for you?

Medjber May 16, 2018

Hi Tanya, thanks for your answear,
Does it mean that I have to Install Wamp ?
Or there is another way to do it without this software ?
TY, Medjber

Tanya Gryshko Flexmonster May 16, 2018

Hello, Medjber,
Thanks for your quick reply.
Yes, Wamp or any other similar software needs to be installed.
Please let me know if you have any other questions.

Medjber May 16, 2018

Ok, i’ll install WAMP.
Thank you again,

Please login or Register to Submit Answer