1

I was wondering if this is at all possible without server-side code: I want to make a HTML file that when loaded will pull information from a excel spreadsheet. What language would I do this in? I can't use a server-side language like PHP.

Thanks in advance for the help!

Jon Blake
  • 11
  • 1
  • Where does this need to run - intranet/internet/desktop? If it's just for local use you can use javascript to automate Excel and read the file's contents, or ADO if the files contents are a regular table. Need more details here. – Tim Williams Aug 01 '12 at 17:32

3 Answers3

2

This may help you: http://www.codeproject.com/Questions/85672/Read-Excel-values-using-Javascript, but you need to have Excel installed in your computer (and the computer running your program). My advice, use server side code (PHP is a good one), and you'll be able to use this nice library: http://phpexcel.codeplex.com/

Rafael
  • 2,827
  • 1
  • 16
  • 17
  • How do I change which sheet I'm in? For example, if i want to read from the second tab instead of the first? – Jon Blake Aug 01 '12 at 21:43
  • @JonBlake You can take a look at the developer documentation of Excel here: http://msdn.microsoft.com/en-us/library/office/bb149067(v=office.12), for what you want to do is Excel.Workbooks(0).ActiveSheet(1) – Rafael Aug 03 '12 at 00:56
  • It's pretty much like you will do it in VB6 or .NET Interop – Rafael Aug 03 '12 at 00:56
0

XLS is a binary proprietary format. Doing this with javascript is nearly impossible. However, with HTML5 File API you can read its binary contents but in order to parse and interpret it you will need to get into the specifications of the XLS format.

If this is helpful please accept! Good luck!

Eman
  • 6,383
  • 4
  • 23
  • 29
0

You might try considering converting it from XLS to CSV and then make use of JavaScript to handle the parsing.

This discussion may also be relevant to you - JavaScript & CSV

Community
  • 1
  • 1
Disruptive Art
  • 308
  • 2
  • 8