Click here to Skip to main content
15,889,034 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Friends...


Please help me in getting data from a url is https://www.alfa.com/en/catalog/B20430/

In this url I want to get B20430 4-Acetamidobenzaldehyde and Bonded ware house table values and General ware house table values and that values should be saved in excel sheet.

Please give me reply as soon as possible.
Thanks in advance to all..
Posted
Updated 8-Sep-19 20:47pm
v2
Comments
Andy Lanng 2-Nov-15 6:04am    
Just to clarify:
The values you want are on a website and you do not have access to their data.
You are using C# and you want a way to "scrape" the site for values?

Is that correct?

Not always a trivial task!
Have a look at some of the existing articles on the subject: Google "Site Scraping c# site:codeproject.com"[^]
 
Share this answer
 
Please see the comment to the question by Andy Lanng. It looks like his assumptions are correct.
What you need called Web scraping: http://en.wikipedia.org/wiki/Web_scraping[^].

Basically, you may need two things: HttpWebRequest and, pretty usually, something to parse HTML you download. Please see my past answers:
How to get the data from another site[^],
get specific data from web page[^],
Performing a some kind of Web Request and getting result[^].

I would add another advice for HTML parsing: use HTML Agility Pack:
https://htmlagilitypack.codeplex.com[^],
https://www.nuget.org/packages/HtmlAgilityPack[^].

—SA
 
Share this answer
 
v2
Try this one....

C#
string _getUri = HttpContext.Current.Request.Url.AbsoluteUri;
          string[] strArray = _getUri.Split('/');
          string ReqValue = strArray[3];
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900