• assign variable to a date cell (excel)

    From timepro timesheet@21:1/5 to All on Sat Apr 2 21:11:15 2022
    hi:

    my app is in xhb+wvw+ps32+dbf

    1. date field in excel cell (this excel file should be open only for reading.) cdest=diskname()+':\tax\einvoice\creditnote\'+creditnotefilename+'xlsx' oexcel=createobject('excel.application')
    oexcel:workbooks:open(cdest)
    osheet=oexcel:activesheet
    xcelRows:=osheet:UsedRange:Rows:Count()
    for exxx=2 to xcelrows
    *
    EINVDATE:=osheet:cells(exxx,7):value
    -type(einvdate) returns 'C', inspite of being a date cell*
    -so i have to code this: if type('einvdate')='C';einvdate=ctod(einvdate);end
    *
    next
    oexcel:quit() & AFTER QUIT, STILL PRESENT IN TASKMANAGER
    oExcel = NIL
    release oExcel

    2. if 'oexcel:activeworkbook:saveas(xlsname)' saves the open excel file.
    what is the command (from within the app) to 'not save' any changes made and close the file.

    3.how to edit/write on a protected cell from within my app.

    4.how to find if an excel file is 'already' open by another-user/you.

    thank you

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