Reputation: 1
I'm trying and trying and I just can't. Please I need to read/display a specific cell in my html just like another text. I'm using this:
function readData()
{
var excel=new ActiveXObject("Excel.Application");
var book=excel.Workbooks.open("http://142.116.39.71/Produ.xls");
var sheet=book.Worksheets.Item(1);
/*var data=sheet.Cells(x,y).Value;
var data=book.ActiveSheet.Cells("");
return data();*/
excel.quit();
excel.application.quit();
excel = null;
book = null;
sheet = null;
CollectGarbage();
}
value=readData("E,18");
//var value=readData("E18", "E18");
document.write("Value from Excel file is "+value);
BUT..... I have this: Value from Excel file is undefined
Upvotes: 0
Views: 3251
Reputation: 1
and you're not passing by the arguments to the function readData(x,y) and you're not declaring variable "value" var value = readData("E","18");
multiple syntax error
Upvotes: 0
Reputation: 1998
Your function is not returning any value. Uncomment the code and correct the code to be return data;
and not return data();
Upvotes: 1