[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.javascript

read excel file using java script

Shankara Subramanian

7/7/2015 5:25:00 AM

any one suggest a way to read the excel file from a java script code.. (should not use any html)
4 Answers

Hans-Georg Michna

7/7/2015 7:02:00 AM

0

On Mon, 6 Jul 2015 22:25:02 -0700 (PDT), Shankara Subramanian
wrote:

>any one suggest a way to read the excel file from a java script code.. (should not use any html)

You would have to rewrite a good part of Excel in JavaScript. A
couple of years of work, perhaps?

It may be easier just to pick strings from the Excel file, but
you would not get the whole structure that way.

The easiest way would be to export the data from Excel in a
format that is much easier to handle, such as TXT, PRN, or CSV.

Hans-Georg

Evertjan.

7/7/2015 10:09:00 AM

0

Shankara Subramanian <hs.shankarasubramanian@gmail.com> wrote on 07 Jul
2015 in comp.lang.javascript:

> any one suggest a way to read the excel file from a java script code..
> (should not use any html)

"java script" != "javascript"

Why this "(should not use any html)"?

A school assignment?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Michael Haufe (\"TNO\")

7/7/2015 1:35:00 PM

0

On Tuesday, July 7, 2015 at 12:25:14 AM UTC-5, Shankara Subramanian wrote:
> any one suggest a way to read the excel file from a java script code.. (should not use any html)

That would depend on where the ECMAScript variant is running.

If you are running this in classic ASP or in WSH (JScript), then there is an API available through:

var excel = new ActiveXObject("Excel.Application");

If you are running this in a webpage that is NOT an *.hta file, then you would need to be more creative. Newer versions of Excel files *.xslx are zipped files that contain a number of resources including an XML representation of the document.

Therefore you could unzip the *.xlsx file, modify its resources and then zip it back up.

if you are on Node.js or another environment I don't know what is available but the unzipping tactic would work there as well.

JJ

7/7/2015 4:08:00 PM

0

On Tue, 7 Jul 2015 06:35:20 -0700 (PDT), Michael Haufe (TNO) wrote:
>
> If you are running this in classic ASP or in WSH (JScript), then there is
> an API available through:
>
> var excel = new ActiveXObject("Excel.Application");

Assuming that the system has Microsoft Excel installed.