Creating webpages with Excel Web App mashups

Pages in this article

  1. Preparations
  2. JavaScript
  3. Web controls
  4. Demo with controls
  5. Dynamic demo
  6. Conclusion

Conclusion

Excel Web Applications and their ability to interact with your web page using JavaScript open up a whole new world of possibilities. Now you can build Excel models your users can interact with using your web site. Also, this enables you to create mashups in which you combine data from multiple sources; you can grab data from other websites and put that into your Excel model and have it show the results on your website.

Further reading

To get this all working I used information from the following sources:

Excel Mashup

MSDN: Using the Excel Services JavaScript API to Work with Embedded Excel Workbooks

MSDN: Ewa Namespace


 


Comments

All comments about this page:


Comment by: Chandoo (15-12-2011 21:12:37) deeplink to this comment

Wow... very exhaustive and clear tutorial. Thank you so much for writing this. I am eager to play with this feature. Will let you know once I build something using this.


Comment by: Jan Karel Pieterse (16-12-2011 03:47:33) deeplink to this comment

Hi Chandoo,

Thanks!


Comment by: Mike Webster (23-4-2014 04:42:58) deeplink to this comment

Hi Jan,

This has been incredibly helpful. Thank you. One thing I can't seem to find a way to do is hide a row using javascript. Is this possible?

Thanks,
Mike


Comment by: Jan Karel Pieterse (28-4-2014 10:15:27) deeplink to this comment

Hi Mike,

That cannot be done using JavaScript (yet).


Comment by: Gan Kok Wee (7-11-2017 04:57:01) deeplink to this comment

Hi,

On OneDrive, I've an Excel file linked to a form. The form contains a set of multiple-choice questions. When a user submits a respond, I would like to compute a score based on the user's input and inform the user via email about the score. I would appreciate any advice on how to achieve this.

FYI, with Google Drive, this is simple as I can use add-ons such as copyDown and formMule on a Google sheet. But for Microsoft 365 on OneDrive, I've been stuck.

Any helps will be much appreciated


Comment by: Jan Karel Pieterse (7-11-2017 17:43:57) deeplink to this comment

Hi Gan Kok,

I'm afraid Excel on-line does not offer such options.


Comment by: Abhigyan (13-3-2024 10:37:00) deeplink to this comment

Hi Jan,

found your website really helpful.

I want to embed an Excel calculator on my webpage. I have been able to do the same. The only problem is the buttons that appear on the bottom right side of the embed. with just a click anyone can access my entire workbook which has all the data that I don't want the users to see.

I can see that on your 'Demo with controls' page phase difference graph any such buttons are missing. How can that be achieved that people only have access to the range that is in the embed and not the option to see full workbook?


Comment by: Jan Karel Pieterse (13-3-2024 14:23:00) deeplink to this comment

Hi Abhigyan,

After clicking that Embed button, select the link "Customize how this workbook will...". That should give you some HTML with Javascript. It has an option to display the download button:

wdDownloadButton=True


Change that to False.
Note that anyone who knows about the developer tools in the browser can turn it back on to get that download button back.


Comment by: Abhigyan (13-3-2024 22:15:00) deeplink to this comment

Hi Jan,

Thanks for your response. Did that but the buttons are still there. One of the buttons is called 'view full size workbook' and it opens entire workbook.

Here's my HTML code:

<iframe width="649" height="400" frameborder="0" scrolling="no" src="https://onedrive.live.com/embed?resid=D4C3E80B7E1FEA9E%21107&authkey=%21APzyjG_z8tXJpoE&em=2&wdAllowInteractivity=False&AllowTyping=True&Item='Quote%20Commodity%20X%20Port'!B10%3AE11&wdHideGridlines=True&wdInConfigurator=True&wdInConfigurator=True"></iframe>

Can you help?


Comment by: Jan Karel Pieterse (13-3-2024 23:12:00) deeplink to this comment

I see the property I mentioned is not in your frame code. What happens if you add it?


Comment by: Abhigyan (15-3-2024 11:48:00) deeplink to this comment

Even with the button the same kind of result is coming.


How do I hide the show full sheet buttons from the bottom?


<iframe width="649" height="400" frameborder="0" scrolling="no" src="https://onedrive.live.com/embed?resid=D4C3E80B7E1FEA9E%21107&authkey=%21APzyjG_z8tXJpoE&em=2&wdAllowInteractivity=False&AllowTyping=True&Item='Quote%20Commodity%20X%20Port'!B10%3AE11&wdDownloadButton=False&wdInConfigurator=True&wdInConfigurator=True"></iframe>


Comment by: Jan Karel Pieterse (18-3-2024 10:18:00) deeplink to this comment

Hi Abhigyan,

Can you share a url of the page where you are trying to achieve this? Perhaps I can take a look?


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.




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