FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Excel an coordinates
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Excel an coordinates
Posted: Mon May 21, 2012 06:06 AM

Hi,

Is there a way to find out the position of ex. the 3the row, and the 5th column in an excel-sheet?
I fill a sheet with data and at the end I do a autofit().
Then I want to add some bmp-files to the document, but I need to know the coordinates if the cell's.

Thanks,
Marc

Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Re: Excel an coordinates
Posted: Mon May 21, 2012 06:35 AM
Code (fw): Select all Collapse
nRow:=oExcel:ActiveCell:Row
nColumn:=oExcel:ActiveCell:Column


Regards
Anser
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Re: Excel an coordinates
Posted: Mon May 21, 2012 07:24 AM
Anser,

Thanks for your reply, but this is not what I want.
This is returning the Columnnumber and Rownumber.
I want the Coordinates in pixels to add a BMP with
Code (fw): Select all Collapse
oExcel:ActiveSheet:Shapes:AddPicture( "TEST.BMP", .F., .T., 10, 10, 640, 400 )


Or is it possible to put it in an excel using the Columnnumber and Rownumber?
Regards,
Marc
Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Re: Excel an coordinates
Posted: Mon May 21, 2012 08:43 AM
Marc Vanzegbroeck wrote:
Or is it possible to put it in an excel using the Columnnumber and Rownumber?
Regards,
Marc


Try this. I have not tested
Code (fw): Select all Collapse
oRange:=oSheet:Range("J8")
oExcel:ActiveSheet:Shapes:AddPicture("TEST.BMP",.F., .T., oRange:Left, oRange:Top, 640, 400)


Regards
Anser
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Re: Excel an coordinates
Posted: Mon May 21, 2012 08:58 AM

Thanks Anser,

This is just what I wanted!!

Regards,
Marc

Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite

Continue the discussion