[Migrated content. Thread originally posted on 22 September 2003]
I want to open a semicolon delimted testfile in excel. This works fine. When I want to close the workbook with "modify @close(0)" I get a WRUN32 runtime error.
I compile my program with the follwing commandline:
\\acucbl521\\acugt\\BIN\\ccbl32.exe -di -Zl -Te 300 -Td 3000 -Zd -o testexcel.obj -lo testexcel.lst -Lw -Sp ;\\dt\\PROD\\cop;\\dt\\PROD\\scr; testexcel.cbl
What am I doing wrong?
Could you provide a sample file for data input too?
[Migrated content. Thread originally posted on 22 September 2003]
I want to open a semicolon delimted testfile in excel. This works fine. When I want to close the workbook with "modify @close(0)" I get a WRUN32 runtime error.
I compile my program with the follwing commandline:
\\acucbl521\\acugt\\BIN\\ccbl32.exe -di -Zl -Te 300 -Td 3000 -Zd -o testexcel.obj -lo testexcel.lst -Lw -Sp ;\\dt\\PROD\\cop;\\dt\\PROD\\scr; testexcel.cbl
What am I doing wrong?
Could you provide a sample file for data input too?
[Migrated content. Thread originally posted on 22 September 2003]
I want to open a semicolon delimted testfile in excel. This works fine. When I want to close the workbook with "modify @close(0)" I get a WRUN32 runtime error.
I compile my program with the follwing commandline:
\\acucbl521\\acugt\\BIN\\ccbl32.exe -di -Zl -Te 300 -Td 3000 -Zd -o testexcel.obj -lo testexcel.lst -Lw -Sp ;\\dt\\PROD\\cop;\\dt\\PROD\\scr; testexcel.cbl
What am I doing wrong?
I think the problem is the WorkBooks OpenText method does not return a workbook handle like the Open method does. If you want to return a WorkBook handle, then use the Open method instead. If you want to keep using OpenText then you can close the WorkBooks collection and Excel like this:
|Close Workbooks collection
MODIFY olExcel Workbooks::Close().
|Then quit excel application
MODIFY olExcel Quit().
DESTROY olExcel.
[Migrated content. Thread originally posted on 22 September 2003]
I want to open a semicolon delimted testfile in excel. This works fine. When I want to close the workbook with "modify @close(0)" I get a WRUN32 runtime error.
I compile my program with the follwing commandline:
\\acucbl521\\acugt\\BIN\\ccbl32.exe -di -Zl -Te 300 -Td 3000 -Zd -o testexcel.obj -lo testexcel.lst -Lw -Sp ;\\dt\\PROD\\cop;\\dt\\PROD\\scr; testexcel.cbl
What am I doing wrong?
Thanks,
This helps me a lot but off course I want to do something between the opentext and the close statement. Therefore I need the workbook handle. When I knew that the opentext doesn?t return a workbook handle I have been looking to retrieve the handle in another way and after some time I found the next solution ?INQUIRE olExcel @Workbooks::Item("000639.XLS") IN olWrkBk.? after the opentext statement.
[Migrated content. Thread originally posted on 22 September 2003]
I want to open a semicolon delimted testfile in excel. This works fine. When I want to close the workbook with "modify @close(0)" I get a WRUN32 runtime error.
I compile my program with the follwing commandline:
\\acucbl521\\acugt\\BIN\\ccbl32.exe -di -Zl -Te 300 -Td 3000 -Zd -o testexcel.obj -lo testexcel.lst -Lw -Sp ;\\dt\\PROD\\cop;\\dt\\PROD\\scr; testexcel.cbl
What am I doing wrong?
Thanks,
This helps me a lot but off course I want to do something between the opentext and the close statement. Therefore I need the workbook handle. When I knew that the opentext doesn?t return a workbook handle I have been looking to retrieve the handle in another way and after some time I found the next solution ?INQUIRE olExcel @Workbooks::Item("000639.XLS") IN olWrkBk.? after the opentext statement.
[Migrated content. Thread originally posted on 22 September 2003]
I want to open a semicolon delimted testfile in excel. This works fine. When I want to close the workbook with "modify @close(0)" I get a WRUN32 runtime error.
I compile my program with the follwing commandline:
\\acucbl521\\acugt\\BIN\\ccbl32.exe -di -Zl -Te 300 -Td 3000 -Zd -o testexcel.obj -lo testexcel.lst -Lw -Sp ;\\dt\\PROD\\cop;\\dt\\PROD\\scr; testexcel.cbl
What am I doing wrong?
You should be able to do this in one step with the Open method which returns a Workbook handle. I believe the Open method has paramaters that let you specify a csv file and the delimiter.