如何使用 ActiveX 对象获取我的 excel 文件的所有可用工作表名称的列表?
我知道这段代码Excel.ActiveWorkBook.Sheets
会返回工作表......但是我怎样才能在数组中获取这些工作表的名称?
function getTabs()
{
var w =new ActiveXObject("Excel.Application");
var book = w.Workbooks.Open(excelFile);
alert(book.name); //here I get the filename of my xls file and it displays ok
var ExcelSheet= book.Sheets;
alert(ExcelSheet); //This alerts to 'undefined'
w.Quit();
w=null;
}
这是我现在的代码......