I write on line 0 excel ?
Hello, a simple and quick questions.
I'm copying a table and inserting her values in excel, though, I'm not able to write the first column of the table.
The variable column starting with the value 1, in which case it writes correctly but does not write the first column.
If I comment out the command to write in excel, and add a log line and put the variable column to 0, you can see the correct columns in the log, including the first.
When trying to write in excel with the variable column to 0, it appears an error screen, and the script does not continue.
It's like in excel not exist 0.
Is it possible to write the first column in some way?
var i = 1; for (i; i < ABody.rows.length; i++) { var linha = ABody.rows.item(i); Log.AppendFolder("Row " + i); var j = 1; //<- here is the column for (j; j < linha.cells.length; j++) { var cell = linha.cells.item(j); Log.Message("Valor " + j + ": " + cell.innerText); //<- Log Book.Cells(1) = aqConvert.VarToStr(tag +" --> "+ tag1); //<-Header Book.Cells(i, j) = aqConvert.VarToStr(cell.innerText); Delay(1000); } }
if I keep the variable 'j' to 1, the code work, but the first column is not written in excel. If I put the variable to 0 an error occurs.
This Error:
';' expected
Error location:
Unit: "aneel_coleta\aneel_coleta\Script\test"
Line: 116 Column: 4. <- This Line - Book.Cells(i, j)=aqConvert.VarToStr(cell.innerText);