• insert .jpg in excel cell

    From timepro timesheet@21:1/5 to All on Wed Sep 27 12:48:33 2023
    -how to insert/display a .jpg file in a cell-

    oexcel=createobject('excel.application')
    oexcel:workbooks:add()
    osheet=oexcel:activesheet
    ...
    ...
    *
    C_imgfile=diskname()+':\'+mytaxfolder+'\tick.jpg'
    how to insert/display C_imgfile in a cell:
    e.g.: osheet:cells(xrow,xcol):value=C_IMGFILE && what's the exact syntax?
    *
    ...
    ... osheet=oexcel:activesheet();osheet:rows(freezerow):select();oexcel:activewindow:freezepanes=.t.
    oexcel:activeworkbook:saveas(xlsname)
    xcelRows1:=osheet:UsedRange:Rows:Count()
    oexcel:workbooks:open(xlsname)
    oexcel:visible=.t.

    TIA

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Thu Sep 28 09:27:55 2023
    Il 27/09/2023 21:48, timepro timesheet ha scritto:

    -how to insert/display a .jpg file in a cell-

    oSheet:Shapes:AddPicture( cImg, .F., .T., 0, 0, 200, 150 )

    cImg is the full path and name of the file.

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Thu Sep 28 21:30:45 2023
    Il 28/09/2023 21:23, timepro timesheet ha scritto:

    but, the .jpg is inserted at what cell co-ords?
    e.g. if the .jpg is to be displayed/saved in cell(10,29), what would be the syntax.

    https://learn.microsoft.com/en-us/office/vba/api/excel.shapes.addpicture

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From timepro timesheet@21:1/5 to Enrico Maria Giordano on Thu Sep 28 12:23:42 2023
    On Thursday, September 28, 2023 at 12:57:58 PM UTC+5:30, Enrico Maria Giordano wrote:
    Il 27/09/2023 21:48, timepro timesheet ha scritto:

    -how to insert/display a .jpg file in a cell-
    oSheet:Shapes:AddPicture( cImg, .F., .T., 0, 0, 200, 150 )

    cImg is the full path and name of the file.

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    thanks
    but, the .jpg is inserted at what cell co-ords?
    e.g. if the .jpg is to be displayed/saved in cell(10,29), what would be the syntax.

    TIA.

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