Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Excelsheet Class
#1
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
#2
Look in Task Manager. There should be a hidden EXCEL.exe process that locked the file. End it.

I don't have this problem with your code. If EXCEL does not disappear from the task manager when the macro ends, try to add this at the end:

err+
es.ws.Application.Quit


Forum Jump:


Users browsing this thread: 1 Guest(s)