f



read excel file using java script

any one suggest a way to read the excel file from a java script code..  (should not use any html)
0
Shankara
7/7/2015 5:25:02 AM
comp.lang.javascript 38370 articles. 2 followers. javascript4 (1315) is leader. Post Follow

4 Replies
870 Views

Similar Articles

[PageSpeed] 47

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
0
Hans
7/7/2015 7:01:40 AM
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)
0
Evertjan
7/7/2015 10:09:21 AM
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.
0
Michael
7/7/2015 1:35:20 PM
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.
0
JJ
7/7/2015 4:08:13 PM
Reply: