tototoshi/scala-csv

Reading CSV file from an URL

Nikhdy opened this issue · 1 comments

I know this question is better suited for StackOverflow, but could not find anything as specific there.

Can we read a csv directly from an url ? Something like

CSVReader.open(new URL(http://website.com/sample.csv).getFile()).allWithHeaders()

This throws an java.io.FileNotFoundException: /sample.csv (No such file or directory) exception.

use CSVReader.open(scala.io.Source.fromURL("http://website.com/sample.csv"))