PDA

View Full Version : compare two rows form excel files using array and objects



mujahid_zain
09-04-2008, 02:46 PM
hi there

is it possible to compare two rows of two diffrent excel files by storing the values in the array objects .

thanks

mujahid_zain
09-08-2008, 03:23 PM
hi coders there any ideas regarding this one

Philip M
09-08-2008, 04:24 PM
Ajax.

If you mean how do you compare the two rows from the Excel files after you have captured them,
something like this:-



<script type = "text/javascript">
var x = "The quick brown fox jumps over the lazy dog";
var xArray = x.split(" ");
var y = "The quick brown cat jumps over the lazy dog";
var yArray = y.split(" ");

for (var i =0; i<=x.length; i++) {
if (xArray[i] != yArray[i]) {
alert ("Array element " + i + " does not match");
}
}
</script>


Quizmaster: The Cairngorm Mountains are home to Britain's last free-ranging herds of which animals, popularly associated with Christmas?
Contestant: Turkeys.

mujahid_zain
10-01-2008, 12:32 PM
compare cells of the row such as 1a with 1a and b with 1b etc and if any of the cell is different then paste the entire row in the third sheet with suffix changed.

thanks