Most Valuable Professional

View Jan Karel Pieterse's profile on LinkedIn subscribe to rss feed
Subscribe in a reader

Subscribe to our mailing list

* indicates required

Audit !!!

Check out our RefTreeAnalyser
the ultimate Excel formula auditing tool.


Excel VBA Masterclass (English)
Excel VBA for Financials (Dutch)

Third party tools

Speed up your file

The best tool to optimise your Excel model!

Repair your file

Stellar Phoenix Excel Repair
Best tool to repair corrupt Excel sheets and objects
Home > English site > Articles > Excel Web App Mashups > Demo with controls
Deze pagina in het Nederlands

Creating webpages with Excel Web App mashups

Demo of an embedded Excel Web App responding to form controls

Edit the values in the two textboxes and click the Update Chart button to update the Excel Web App!
Remember to use the decimal separator that belongs to your windows country setting. If the chart stays blank, try using the dot instead of the comma or vice versa.

Phase difference (degrees) Frequency ratio 

Please Wait...

The next page shows a demo where I used an event to create a dynamically updating chart.



Showing last 8 comments of 10 in total (Show All Comments):


Comment by: Maxime Manuel (23-8-2014 04:38:24)

This is amazing. I love Excel more and more.
Thank you for sharing such tips.


Comment by: Rich (25-9-2014 08:07:06)

Thanks so much. This has been very useful.


Comment by: Robin Jansson (25-4-2016 19:56:43)

Great guide first of all, works like a charm!

How ever, I saw you had a "loading screen" for the embeddedexcel document and I were wondering if you mind sharing that with us? :)


Comment by: Jan Karel Pieterse (26-4-2016 13:25:55)

Hi Robin,

Just above the location of the embedded file you place a div tag called "loadingdiv" which contains the "loading screen" text.

<div id="loadingdiv"><h3>Please Wait...</h3></div>

The Javascript hides this div when loading is completed:

function OnChartLoaded(asyncResult)
        if (asyncResult.getSucceeded())
            ewaCht = asyncResult.getEwaControl();
            ewaCht.getActiveWorkbook().getRangeA1Async('b1:b2', getRangeForControls, null);
        document.getElementById("loadingdiv").style.display = "none";


Comment by: Ashish Gupta (17-5-2016 14:12:27)

Hi Dirk,

I have an excel file with few macro's and 2 user forms.This file on my system is a complete application for me right now. Am I able to load it or embed it on website or webpage so that user can interact with my excel file directly ? Any help via Java script or html will work for me.

Thanks a lot in advance for any help.

Ashish Gupta


Comment by: Jan Karel Pieterse (17-5-2016 15:04:15)

Hi Ashish,

Web Excel does not nor ever will run VBA. You will have to build a JavaScript Excel add-in to enable automation of web Excel. Advantage of doing this is that your code would also run on iPad Excel and Android Excel.


Comment by: Mark (8-2-2017 13:17:42)

Thanks for this info. I have copied the code on this page into a new html file and everything works fine but I'm getting an issue with my own excel file on onedrive.
I have set up a simple workbook with chart values in cells b1 and b2. I have then made a chart. Next I have shared the workbook using an edit link.
I have then copied the embed code fileToken value.
The chart displays fine on the page, the values from cells b1 and b2 are shown in the text boxes but when I try to change the values and click the button the chart displays "working on it" followed by "still working on it" and loops through these two statements without ever updating.
Any ideas on what I might be doing wrong?


Comment by: Jan Karel Pieterse (9-2-2017 16:04:24)

Hi Mark,

To be honest, I don't know. Does it work if you edit the cells in question directly in the embedded worksheet object?


Have a question, comment or suggestion? Then please use this form.

If your question is not directly related to this web page, but rather a more general "How do I do this" Excel question, then I advise you to ask your question here:

Please enter your name (required):

Your e-mail address (optional, will only be used to inform you when your comment is published or to respond to your question directly):

Your request or comment (max 2000 characters):

To post VBA code in your comment, use [VB] tags, like this: [VB]Code goes here[/VB].

I give permission to process this data and display my name and my comment on this website accoring to our Privacy Policy.