‎2012 May 24 6:26 AM
Hi Experts,
I'm using
CREATE OBJECT h_excel 'EXCEL.APPLICATION'.
for opening MS-Excel document.
It is opening in Excel 2003 version.
Is it possible to open the Excel in 2007 Version? How can this be achieved?
Please do help.
Thanks & Regards,
Sowmya
‎2012 Jun 15 5:16 AM
The issue is resolved.
It is not with the code.
The issue was with the Server version.
-Thanks & Regards,
Sowmya
‎2012 May 24 6:33 AM
Use this to achieve the upload
Private Declare Sub Sleep Lib "kernel32" _
(ByVal dwMilliseconds As Long)
Sub StartExcel()
Dim objExcel As Object
On Error Resume Next
Set objExcel = GetObject("Excel.Application")
If Err.Number <> 0 Then
Set objWshShell = CreateObject("WScript.Shell")
objWshShell.Run "Excel.exe /s"
Do While Not objExcel Is Nothing
Sleep 250
Set objExcel = GetObject("Excel.Application")
Loop
End If
On Error GoTo 0
objExcel.Visible = True
End Sub
Karthik.R
‎2012 May 24 6:40 AM
ABAP OLE2 code pls.
***************** creates an excel application
CREATE OBJECT h_excel 'EXCEL.APPLICATION'.
*Sheet1
CALL METHOD OF
h_excel
'Workbooks' = h_mapl.
SET PROPERTY OF h_excel 'Visible' = 1.
*************** opens a work book
CALL METHOD OF
h_mapl
'Add' = h_map.
How to open the Excel Appln in 2007 version?
Thanks,
Sowmya
‎2012 May 24 6:55 AM
‎2012 May 24 7:22 AM
‎2012 May 24 7:36 AM
Check the settings.Click on the office button in the top left hand corner of xls ->Excel options->Trust center-> trust center settings->macro settings->Check "enable all macros"-> and also check the "trust access to vba".
‎2012 May 24 7:45 AM
Trust access to VBA is checked, but not "Enable all macros..." is not checked as I dont have authorization.
‎2012 May 24 8:06 AM
As per my knowledge if u enable macros.It will work perfectly.If it is disabled contact sys admin
‎2012 Jun 15 5:16 AM
The issue is resolved.
It is not with the code.
The issue was with the Server version.
-Thanks & Regards,
Sowmya