All examples By author By category About

hlvoorhees

process local csv file example

This example uses FileReader to process a local file instead of one provided by the server. To demonstrate, click "Choose File" and select a file. It will succeed on Chrome and Firefox, but not Internet Explorer (even a recent version).

In IE, an "Access is denied" error occurs when calling request.open() in d3_xhr.send() which occurs when calling d3.csv() with the data URL.

Can anyone suggest how to fix this for IE?

Edit: Found a workaround by using FileReader.readAsText() instead of readAsDataURL().