step 1 - Create a spreadsheet with 10 rows of data (C:\1\book1.xls)
step 2 - In column 1 row 6 type hello
step 3 - Column 9 type 1
Then run this script and open text file it creates: c:\1\test\test.txt
Code: Select all
Let>connStr=Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq=c:\1\Book1.xls;
Let>connStr=Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\1\Book1.xls;Extended Properties=Excel 8.0;
DBConnect>connStr,dbH
Let>SQL=select * from [Sheet1$]
DBQuery>dbH,SQL,rsSheet1,nR,nF
label>Start
Let>row=0
Repeat>row
Let>row=row+1
Let>cell1=rsSheet1_%row%_1
WriteLn>c:\1\test\test.txt,r,%cell1%%TAB%%row%
Until>row=nR
DBClose>dbH
However, if I follow the same steps:
step 1 - Create a spreadsheet with 10 rows of data (C:\1\book1.xls)
step 2 - In column 1 row 6 type hello
step 3 - Column 9 type 1
But add:
step 4 - In column 1 any cell 1-5 type a number.
Run the script and 'the number', sometimes hello and 1 appear in text file. But hello does not always appear for me.