We usually allow the user to specify the location to save an excel sheet produced from our system. I now want to save the sheet to a specified location/file and exit without a save dialogue box coming up. but cannot seem to get the syntax correct. Can anyone help with this?
We usually allow the user to specify the location to save an excel sheet produced from our system. I now want to save the sheet to a specified location/file and exit without a save dialogue box coming up. but cannot seem to get the syntax correct. Can anyone help with this?
- how are you creating the excel spreadsheet?
- Are you writing one out directly from cobol?
- Are you using the ole interface somehow?
- Are you making calls to the excel dll? (that one would be my guess)
- how are you currently trying to save the file
We usually allow the user to specify the location to save an excel sheet produced from our system. I now want to save the sheet to a specified location/file and exit without a save dialogue box coming up. but cannot seem to get the syntax correct. Can anyone help with this?
77 OLEXCEL handle of application of excel.
CREATE Application OF Excel
HANDLE IN OLEXCEL.
*This is for training purposes only. If you don't want to see
*Excel, remove this line.
MODIFY OLEXCEL @Visible = 0.
MODIFY OLEXCEL @UserControl = 0.
MODIFY OLEXCEL @DisplayAlerts = 0.
EVALUATE TXT2XLS-FORMAAT
WHEN "TXT"
MODIFY OLEXCEL
ActiveWorkbook::SaveAs(
BY NAME Filename TXT2XLS-SAVEAS-BESTNAAM,
BY NAME FileFormat xlText)
WHEN OTHER
MODIFY OLEXCEL
ActiveWorkbook::SaveAs(
BY NAME Filename TXT2XLS-SAVEAS-BESTNAAM,
BY NAME FileFormat xlNormal)
END-EVALUATE.
77 OLEXCEL handle of application of excel.
CREATE Application OF Excel
HANDLE IN OLEXCEL.
*This is for training purposes only. If you don't want to see
*Excel, remove this line.
MODIFY OLEXCEL @Visible = 0.
MODIFY OLEXCEL @UserControl = 0.
MODIFY OLEXCEL @DisplayAlerts = 0.
EVALUATE TXT2XLS-FORMAAT
WHEN "TXT"
MODIFY OLEXCEL
ActiveWorkbook::SaveAs(
BY NAME Filename TXT2XLS-SAVEAS-BESTNAAM,
BY NAME FileFormat xlText)
WHEN OTHER
MODIFY OLEXCEL
ActiveWorkbook::SaveAs(
BY NAME Filename TXT2XLS-SAVEAS-BESTNAAM,
BY NAME FileFormat xlNormal)
END-EVALUATE.
Is this really an Acu program? I can't get past line 1.
0000BC CREATE Application OF Excel HANDLE IN excel-handle.
-->ERROR: Object class name expected, @APPLICATION found
-->ERROR: Verb expected, @APPLICATION found
------------------------------
Peter Clayton
Developer
Cobsolv Cc
Midrand ZA
------------------------------
Is this really an Acu program? I can't get past line 1.
0000BC CREATE Application OF Excel HANDLE IN excel-handle.
-->ERROR: Object class name expected, @APPLICATION found
-->ERROR: Verb expected, @APPLICATION found
------------------------------
Peter Clayton
Developer
Cobsolv Cc
Midrand ZA
------------------------------
Best guess: they used the NETDEFGEN utility to create a copy library from a .net or active-x control. You can look up the CREATE verb in the manual, which is in the windows help file that Rocket provides.
------------------------------
Robert Redekop
Senior Programmer/Analyst
Samco Software Inc
Surrey CA
------------------------------
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.