Il 03/03/2021 11:34, Paul ha scritto:
Try with a single TRY/CATCH/END with CreateObject() inside and let me know.
In my test environment my function works fine but it did not work for a customer, unfortunately I do not know what is different in his PC than withAs far as I know, this should work anywhere:
FUNCTION MAIN()
LOCAL oExcel
TRY
oExcel = CREATEOBJECT( "Excel.Application" )
? oExcel:ClassName
CATCH
? "Error"
END
INKEY( 0 )
RETURN NIL
EMG
http://www.emagsoftware.it
http://www.emagsoftware.it/emgmusic
http://www.emagsoftware.it/spectrum
http://www.emagsoftware.it/tbosg
On Wednesday, March 3, 2021 at 6:38:15 PM UTC+5:30, Enrico Maria Giordano wrote:
Il 03/03/2021 11:34, Paul ha scritto:
As far as I know, this should work anywhere:Try with a single TRY/CATCH/END with CreateObject() inside and let me know.
In my test environment my function works fine but it did not work for a customer, unfortunately I do not know what is different in his PC than with
FUNCTION MAIN()
LOCAL oExcel
TRY
oExcel = CREATEOBJECT( "Excel.Application" )
? oExcel:ClassName
CATCH
? "Error"
END
INKEY( 0 )
RETURN NIL
EMG
http://www.emagsoftware.it
http://www.emagsoftware.it/emgmusic
http://www.emagsoftware.it/spectrum
http://www.emagsoftware.it/tbosg
hi:
my app is in xhb+dbf+ps32+wvw
: does this check (by default) for office365-excel TOO, if excel not 'installed' in particular system.
is_excel=.f.
try
oexcel=CREATEOBJECT("Excel.Application")
oexcel:workbooks:add()
osheet=oexcel:activesheet
osheet:name:=xsheetname
is_excel:=.t.
catch
is_excel:=.f.
end
if !is_excel
dcr(22,00,24,79,xlv) && udf
tone(444,7)
dla6(23,39,'[excel not installed in this system]',xb,xy,fcn,6,6,900) inkey(1);inkey(7)
retu .f.
end
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 292 |
Nodes: | 16 (2 / 14) |
Uptime: | 192:12:19 |
Calls: | 6,616 |
Files: | 12,166 |
Messages: | 5,315,292 |