Reading values out of cell in Excel
I can connect but when I attempt to rotate through the cells and write them out to an array I get an error.
var Uarray = [];
var SEarray = [];
var Carray = [];
for(var i = 0; i < 6; i++) {
switch(VarToStr(Excel.Cells(i,0))) //This is line 23
// I have tried Excel.ActiveSheet.Cell
{
case "E":
for(var j=0; j < 13; j++) {
Earray
Log.Message(VarToStr(Excel.cells(i,j)));
}
break;
case "U":
for(var k=0; k < 13; k++) {
Uarray
Log.Message(VarToStr(Excel.cells(i,k)));
}
break;
case "C":
for(var l=0; l < 13; l++) {
Carray
}
break;
default:
Log.Message("Value found that was not expected");
break;
}
}
Error: Microsoft JScript runtime error
Expected ';'
Error Location: Line 23 Col 5
Basically what I am looking to do is read in a row at a time, look at the first value (cell) then depending on its value place the remaining cells that are in that row into an array. Then move to the next row. I know the code up there is not completly finished to do that.