• Check if Excel ist installed?

    From timepro timesheet@21:1/5 to Enrico Maria Giordano on Sat Apr 10 21:48:42 2021
    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:

    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
    As 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

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Otto Haldi@21:1/5 to All on Thu Apr 15 11:27:22 2021
    Le 11/04/2021 à 06:48, timepro timesheet a écrit :
    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:

    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
    As 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

    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


    Hello Enrico,
    I will try next this solution too.
    Many thanks
    Otto

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)