Hi,
I want to download file from nse india website (csv,zip) and convert it to .xls file format. for eg. "http://www.nse-india.com/content/nsccl/oi_cli_limit_07-JAN-2013.lst"
Download files(csv,zip) from web site and convert it to xls.
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Debra Duchene8 pointsPosted May 28, 2014, 1:06 AM EDT
using (WebClient client = new WebClient()) { string url = "http://www.nse-india.com/content/nsccl/oi_cli_limit_07-JAN-2013.lst"; string downloadedFile = "oi_cli_limit_07-JAN-2013.lst"; string convertedFile = "oi_cli_limit_07-JAN-2013.xls"; client.DownloadFile(url, downloadedFile); ExcelFile.Load(downloadedFile, LoadOptions.CsvDefault) .Save(convertedFile, SaveOptions.XlsDefault); }