02-24-2009, 04:42 PM
I am using the following code for reading two columns of all the used rows. After macro finishes and I try to open file by double clicking the file Excel starts and close without any error. Then I opened Excel and using open Dialog I tried to again open the same file. Now it shows that the file can be open only in read only mode ?? I even tried by closing quiting QM but the problem persists.
Code:
out
ExcelSheet es.Init("Netposition" 8 "C:\netposition.xls")
str s1 s2; int row
for row 1 100000
if(!es.GetCell(s1 2 row)) break ;;break when there are no more used rows
es.GetCell(s2 4 row)
out "A%i=%s; B%i=%s" row s1 row s2
es.Save
Code:
out
ExcelSheet es.Init("Netposition" 8 "C:\netposition.xls")
str s1 s2; int row
for row 1 100000
if(!es.GetCell(s1 2 row)) break ;;break when there are no more used rows
es.GetCell(s2 4 row)
out "A%i=%s; B%i=%s" row s1 row s2
es.Save