Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3616028
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:26:54+00:00 2026-05-18T22:26:54+00:00

I am making an iPhone app which requires the current Stock Prices. I am

  • 0

I am making an iPhone app which requires the current Stock Prices.

I am receiving the data in CSV format from a link given below.

http://finance.yahoo.com/d/quotes.csv?s=RHT+MSFT&f=sb2b3jk

Is it possible to convert the CSV format to NSData or NSString format? If yes, how can I do so?

What can be the other alternatives for this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T22:26:55+00:00Added an answer on May 18, 2026 at 10:26 pm

    Don’t re-invent the wheel: CHCSVParser is a native CSV parser written in Objective-C. It properly handles quoted fields, escaped characters, etc. It has convenience methods (+[NSArray arrayWithContentsOfCSVFile:...]) and chunks the file reading so as not to produce low memory warnings.

    Here’s (more or less) how you’d use it. That the CSV file is remote complicates things a little bit, but not much (you have to download the contents of the URL into a string, and then pass that string into the parser).

    #import "CHCSV.h"
    
    int main (int argc, const char * argv[]) {
        NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
        NSString * csv = [NSString stringWithContentsOfURL:[NSURL URLWithString:@"http://download.finance.yahoo.com/d/quotes.csv?s=RHT+MSFT&f=sb2b3jk"]];
        NSArray * rows = [NSArray arrayWithContentsOfCSVString:csv encoding:NSUTF8StringEncoding error:nil];
        //You can also do:  rows = [csv CSVComponents];
        NSLog(@"rows: %@", rows);
        [pool drain];
        return 0;
    }
    

    This logs:

    2010-12-23 09:05:44.431 CHCSVParser[99377:a0f] (
            (
            RHT,
            "46.48",
            "46.46",
            "26.51",
            "49.00"
        ),
            (
            MSFT,
            "28.23",
            "28.22",
            "22.73",
            "31.58"
        ),
            (
            ""
        )
    )
    

    It returns an NSArray of NSArrays of NSStrings.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making an iPhone app in which I retrieve JSON data from http://maps.googleapis.com/maps/api/geocode/json?address=canada&sensor=true ,
I am making an application (iPhone app) which gets information (jokes) from an RSS
I'm making an iphone app that uses NSURLConnection to download some data from the
I am making an iphone app which requires me to make use of website
I'm making an iPhone App which involves balloons (UIImageViews) being spawned from the bottom
I am making an iPhone app which uses UIButton s with Placeholder text on
I am making an iPhone app which needs to send a couple of arrays
My iPhone client app uploads a data to the server, which runs on PHP.
I am making an iPhone app in which on one of the UIWebView I
Hello I am new to iPhone development and I am making an app which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.