d.Siva d.Siva - 5 months ago 51
Javascript Question

how to get names of worksheets in excel file?

i am new in JavaScript programming
i want java script to find the names of worksheets in excel file
1) file upload control in a HTML
2) when user selects the file
3) HTML text box should display comma separated names of worksheet


Please also suggest me event of file upload control on which call to java script function is to be made
thanks in advance

Answer Source

You haven't posted any code here, so I will assume you haven't even started this process and you need to know where to go. Basically, what you want to do is possible but it will be a lot of work and it will only work on Internet Explorer (because you use ActiveX).

To start with, here is a forum post that gives some example code of opening an Excel file and working with it. This will be a good place to start:


Next, you will need to look at the Excel Object Model reference guide for any features or functionality you may want:


Specifically, you want to look at the Sheets list:


Basically, you should be able to open the Excel file and reference the Sheets() list to get the names of all of the sheets in the file.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download