I got a situation in which I have to scan an excel file containing Three big columns as mentioned below.
I have to get input from user which is FN,LN and I have to return corressponding UID as output.
How to do this !!!!
Please Help Me
Thanks for the reply
I will try using split and update you
I am able to search a single column using the below code.
How to extend this as to search two columns and give the corresponding 3rd column as output
var searchPhrase = document.getElementById('searchPhrase').value;
var Worksheet = 'C:\\example.xls';
var Excel = new ActiveXObject('Excel.Application');
Excel.Visible = false;
var Excel_file = Excel.Workbooks.Open(Worksheet, null, true, null,
"abc", null, true, null, null, false, false, null, null, null);
var range = Excel_file.ActiveSheet.Range('A:A');
var jsRangeArray = new VBArray(range.Value).toArray();
var found = false;
for(cells in jsRangeArray)
if(jsRangeArray[cells] == searchPhrase)
document.getElementById("results").innerHTML = "Found";
found = true;
if(found == false)
document.getElementById("results").innerHTML = "Not Found";
Excel = null;
Works fine in IE
that code will always only work in IE, and i doubt anyone will help you with it.
Originally Posted by
if you could use a CSV file instead of a XLS file, i will be more than happy to help.
Users Browsing this Thread
There are currently 1 users browsing this thread.
(0 members and 1 guests)
Tags for this Thread