Quantcast
Channel: Excel IT Pro Discussions forum
Viewing all articles
Browse latest Browse all 11829

Dynamically embed Excel files in webpage

$
0
0

I am trying to allow users to view Excel files (read only) directly in their browser rather than downloading it and opening in Excel.  So far my research tells me that the only way to do this is to first have the Excel file in a OneDrive account and embed it from there.  We maintain our own fileserver, so I'm thinking these are the steps that must take place:

  1. On our system, a user clicks on a link to the Excel file they want to view in-browser.
  2. Their click event makes an ajax request to our webserver to:
    1. validate user's internal credentials and access to the file
    2. find the Excel file on our fileserver.
    3. have the webserver make a OneDrive REST API call to upload said file to some OneDrive account.
      1. I assume there is a way to get the fileToken for the newly added file from this REST call's response?
      2. Is there a way through the REST API to add a file that will delete itself after a given time span?
    4. send the OneDrive fileToken back to the browser in the ajax response.
  3. use the Excel Services JavaScript object model library to load the excel file into an element on my page (via the Ewa.EwaControl.loadEwaAsync function).

This flow seems kind of insane to me, so here are a few questions:

  1. Will this approach even work?
  2. Is OneDrive accessible globally?  Many of our users are in China and typically have trouble getting to services like Google Docs, OneDrive, etc.
  3. Will getting the fileToken from the REST api's response be a problem?  I've read that there might not be a way to get this token programmatically...
  4. Is there any simpler way to accomplish this? For example, forget about the OneDrive middleman completely and pass an actual file (stream) to some Ewa function that will dynamically load it for embedding on a webpage?

Viewing all articles
Browse latest Browse all 11829

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>