0

I have been trying to read a .CSV file into my WP8.1 application.

I found this question: Reading CSV file and storing values into an array, however the Visual Studio does not allow me to use:

            StreamReader(File.OpenRead(@"DataModel/ukhpi.csv"))

As shown in most of the answers, including the top answer.
Specifically, 'File.OpenRead' isn't recognised as part of the System.IO for my IDE, and I am unsure why. I have declared the namespace at the top of the filemm and {File.OpenRead} does not have the light blue colouration that the other keywords from the System.IO namespace do.

I am essentially trying to open a CSV file in a Windows Phone application, and be able manipulate the data individally in each of the columns. The data looks like this:

            2005-01,79
            2005-02,78.93
            2005-03,79.58

            ...

Does anyone have any idea why this isn't working?

Community
  • 1
  • 1
Saif
  • 3
  • 1
  • Have a look at [this](http://stackoverflow.com/a/23951961/6375113) and [this](http://stackoverflow.com/a/24082280/6375113) which may help. Reading files is different on WP so things have to be done slightly different. Have a look at researching reading/writing files on a Windows Phone 8.1 App (this will help narrow the search down). – Bugs Jan 25 '17 at 14:14
  • 1
    Thank you! I have done some research into this and now have parsed the CSV into code, and now need to try to split it. Thanks again :) – Saif Jan 25 '17 at 16:01

0 Answers0