最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - how to embed a live excel spreadsheet in html - Stack Overflow

programmeradmin0浏览0评论

hi i would like to know how i can embed a excel spreadsheet in a web page and change the excel numbers on the hosted file and this in turn automatically changes the webpage sheet?

would like to know if there is a jquery, javascript, css etc code to help me out

for example, book1.xls will be uploaded to the server and index.html will reflect book1.xls as a table in it. when i update book1.xls, it should automatically show in index.html the changed cells.

thanks in advance

hi i would like to know how i can embed a excel spreadsheet in a web page and change the excel numbers on the hosted file and this in turn automatically changes the webpage sheet?

would like to know if there is a jquery, javascript, css etc code to help me out

for example, book1.xls will be uploaded to the server and index.html will reflect book1.xls as a table in it. when i update book1.xls, it should automatically show in index.html the changed cells.

thanks in advance

Share Improve this question asked Aug 1, 2011 at 7:35 hsjbrkhsjbrk 231 gold badge1 silver badge4 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 3

The simple way to actually connect to an XLS is through VBScript, but your server will have to support it (which most do).

Another way would be add an ODBC to your servers connectors pointing to your XLS or MDB or whatever Microsoft data file you choose and use JavaScript or any number of languages to connect to it, retrieve data, make changes, etc. The downside is that you must have Administrative rights to the puter hosting the file. You can use a homeputer to use as server for that file only for instance and link it to your website, but it will affect loading speeds. This will however require you to take a closer look at your home internet security...!!!...but will enable you to make 'live' changes without going to your website. This method is often used for webshops and online catalogues, places where data can change on a daily basis but a database server is undesirable.

The simplest and easiest way is as mentioned before the use of GoogleDocs, but that will require conversion of the document. You won't be using your XLS as datafile. The downside here is that if you make any changes offline (not through the website) the changes will also not be visible, because you'll be editing a pletely different file. So you'll need to convert and upload it to GoogleDocs each and every time.

As you can see the method used greatly depends on how often you plan on updating the data, how much traffic you expect and how secure you want it to be.

A "live" spreadsheet can be shown in a web page via an iframe containing a Google Doc spreadsheet. You cut 'n paste the iframe markup from Google Docs and drop it into your web page. The spreadsheet is editable in GDocs. The iframe view can be set to automatically update when the ss is edited.

Perhaps, this is too bland a solution. But it works. I use it all the time.

I doubt you can do that directly from an .xls file, but if you save your Excel file as .csv, you can read a .csv file via jQuery.

There's a plugin here that displays data from a csv file as a table: http://plugins.jquery./project/csv2table

The same/similar question is also asked in these posts:

  • Read Excel data with JQuery
  • How to parse an excel file in JavaScript?
发布评论

评论列表(0)

  1. 暂无评论