Possible Duplicate:
How to download CSV file from server in Objective-C
How can I get my app to download a CSV file from a webpage? Specifically I’m trying to get the one here:
http://www.google.com/trends/explore#cat=0-14&date=today%207-d&cmpt=q
(settings>download CSV)
Firstly you need to identify the URL of the resource you wish to download over HTTP. After having a look at the HTML I found that this is the actual URL for the CSV:
http://www.google.com/trends/trendsReport?hl=en-US&cat=0-14&date=today%207-d&cmpt=q&content=1&export=1
You will need to experiment and see how this is formatted.
Now that you have the URL you need to download it using HTTP. You can either use the SDK’s request system or a far superior library such as
ASIHTTPRequestorAFNetworking. I would useAFNetworkingsince the former has now been discontinued by its developer.https://github.com/AFNetworking/AFNetworking
This is some sample code to download a CSV file with AFNetworking (I haven’t tested this). Once you have downloaded the file you can perform whatever operations you wanted to on it.
Hope this helps!