There are two javascript function .
the second method would call the first function passing two parameter.
in load_wood_excel function i am not able to access the parameter..
can any ony tel me how to pass interger , and also how to access the parameter in function????????

function load_wood_excel(row,column){

            var Excel;
            Excel = new ActiveXObject("Excel.Application");
            Excel.Visible = false;
            return              Excel.Workbooks.Open("C:/Users/chandrpo/Desktop/othla/OPJ/ram.xls").ActiveSheet.Cells('row','column').Value;

        function iterateExcel(){
        var row = 2;
        var column = 1;
        var someArray = new Array();
                item = load_wood_excel();
                if(item !=null){
                var i = 0;
                someArray[0]= item;
                item1 = load_wood_excel(2,1);
                }while (item != null || item1 != null);

In iterateExcel() , you establish var row = 2; and var column = 1; but don't use either of them.

In the do/while loop, load_wood_excel() is called first without, then with arguments. Try calling the function once with load_wood_excel(row,column) instead of load_wood_excel(2,1) . Adjust the while clause accordingly.

In load_wood_excel(), ...ActiveSheet.Cells('row','column')... , are 'row' and 'column' supposed to be strings? ...ActiveSheet.Cells(row,column)... makes more sense.


Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.