Click here to Skip to main content
15,901,035 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am trying to build-up a page in a blog where I wish to put some dynamic data from another aspx webpage preferably in an iframe without any FTP or SQL server, etc. Is there any way to copy and embed in my blog-page like html code
OR
to get those dynamic data in a google spreadsheet?

Is there any code or procedure to export dynamic data from excel worksheet to Google spreadsheet? I have tried to export dynamic data from excel worksheet to spreadsheet but it turns into a static sheet............ and not DYNAMIC.

Thanks
Posted

If you want to dynamically pick up content from another site and display part of it in your own site, you can try various SiteScraping techniques. A simple one involves HtmlAgilityPack which downloads the target webpage and extracts a specific section (taking HTML to be an XML document). Then you can take that section on your own page.
By having such method on your page load, this will be fetched everytime from the target site. Or you can setup some caching with sliding expiration to have limited hits to target (just to save performance)

As for setting data in google spreadsheet application, you need to check Google API documentation, that's nothing about .net
 
Share this answer
 
Comments
Member 10259149 15-Sep-13 7:20am    
Dear Nitin, Thank you very much. Need some elaboration with example, pl.
Hi
Suppose you just want to take updates of your Code Project profile. Copy the Url of your profile in "_codeProjectProfile" and run the code below. This also takes the CSS as shown in your profile to make sure it appears correctly formatted.

In such codes, you just have to take the html as an xml structure and identify the wanted blocks as XmlNode. The purpose is to get the XPath of your desired node :)

If this serves for your purpose, please vote as answered.

C#
            var webGet = new HtmlWeb();
            var document = webGet.Load(_codeProjectProfile);

            // Get the stylesheets involved
            var stylesheets = document.DocumentNode.SelectNodes("@//link[@rel='stylesheet']");
            List<string> cssFiles = new List<string>();
            foreach (var style in stylesheets)
            {
                cssFiles.Add(style.Attributes["href"].Value);
            }
            var wantedNode = document.DocumentNode.SelectSingleNode("//table[@class='member-profile']");
            if (null != wantedNode)
            {
                cssFiles.ForEach(css =>
                    {
                    string script = "<link rel="\"stylesheet\"" type="\"text/css\"" href="\""+css" />";
                        Page.Header.Controls.Add(new LiteralControl(script));
                    });
                divSiteCodeProject.InnerHtml = wantedNode.OuterHtml;
            }
</string></string>
 
Share this answer
 
Comments
Member 10259149 15-Sep-13 12:40pm    
Thank you. Not getting it. Probably I am doing something wrong somewhere. Anyway, thanks
Hi Nitin Singh,

I am sorry but to say that I have tried but due to my ignorance, I am not able to get it.
Can you elaborate the process, pls. ?

My mail id is : jksarkar2009@gmail.com

Thanks in advance
 
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