HTML into Excel

DAWG2006

Board Regular
Joined
Feb 15, 2009
Messages
86
How can I embed HTML into excel (not excel into HTML)? If there is any way please let me know
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Hello,

put the Microsoft Web Browser from Toolbox bar into your Sheet1. You can adjust the size of the Web Browser by dragging.

Then copy following code into "thisWorkbook":

<div style="background-color:#FFFFFF; border-width:2px; border-style: groove; border-color:#ff9966; padding:4px;"><nobr><span style="font-family:Courier New,Arial; font-size:9pt ;" ><b><span style="color:#000080"; >Private</span> <span style="color:#000080"; >Sub</span> Workbook_Open()</b><br />    Sheet1.WebBrowser1.Navigate <span style="color:#800000"; >"http://www.mrexcel.com/forum/"</span><br /><b><span style="color:#000080"; >End</span> <span style="color:#000080"; >Sub</span></b><br /><br /></span></nobr></div><br/><div style=" background-color:#f8f8f8; border-width:2px; border-style: groove; border-color:#ff9966; padding:4px; width:300px;" >Codehighlighting with <a href="http://www.haserodt.de/cj_pro/cjdirect.php" >CodeJeanieDirectHtml</a></div>

Of course you can amend the web address as you want. Save and close your file. From next start onwards the contents of the webpage will be visible in your Sheet1.
 
Upvote 0
Re: HTML into Excel - embed using Webbrowser

hi,

I realise that this is an old post but if I can get it working it seems like a simple way to solve a problem?

Firstly it took me ages to realise that you have to right click on the toolbox to be able to add the webbrowser tool. I've put it into a form but really I want to embed it on to the excel sheet.

put the Microsoft Web Browser from Toolbox bar into your Sheet1. You can adjust the size of the Web Browser by dragging.

How do you put the Webbrowser into Sheet1 as explained above? It doesn't drag? There is no right clicking on sheet1 in the project window that helps?

Would be grateful if someone could shed some light.

thanks, Rob
 
Upvote 0
1) Press Alt+F11 to open the Visual Basic Editor,
2) Under the "View" menu select "Project Explorer" to ensure that the project explorer is open,
3) Find the VBAProject heading for your workbook eg. { VBAProject(Book1) }
4) Within the 'Excel Objects" under that heading you will find an object called "ThisWorkbook"
5) Right click "ThisWorkbook" and select "View Code"
6) Within the white space that should have opened in the main area of the editor paste in the code that Beate Schmitz provided for you.

<code>
Private Sub Workbook_Open()
Sheet1.WebBrowser1.Navigate "http://www.mrexcel.com/forum/"
End Sub
</code>

7) save the workbook and close excel
8) re-open the workbook and the browser should be embedded in sheet1 of the workbook.
 
Upvote 0

Forum statistics

Threads
1,214,972
Messages
6,122,530
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top