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

File crashes Excel!!

Save my workbook!
The best tool for salvaging problematic workbooks.

Trainings

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

Third party tools

Speed up your file

FastExcel
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.


 


Comments

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

 


Comment by: Maxime Manuel (8/23/2014 4:38:24 AM)

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

 


Comment by: Rich (9/25/2014 8:07:06 AM)

Thanks so much. This has been very useful.

 


Comment by: Robin Jansson (4/25/2016 7:56:43 PM)

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 (4/26/2016 1:25:55 PM)

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 (5/17/2016 2:12:27 PM)

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.

Regards
Ashish Gupta

 


Comment by: Jan Karel Pieterse (5/17/2016 3:04:15 PM)

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 (2/8/2017 1:17:42 PM)

Hello,
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?
Cheers,
Mark

 


Comment by: Jan Karel Pieterse (2/9/2017 4:04:24 PM)

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: www.eileenslounge.com.

Please enter your name (required):

Your e-mail address (optional but if you want me to respond it helps!; will not be shown, nor be used to send you unsolicited information):

Your request or comment:

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