Excel an coordinates

Post Reply
Marc Vanzegbroeck
Posts: 1163
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium
Contact:

Excel an coordinates

Post by Marc Vanzegbroeck »

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
User avatar
anserkk
Posts: 1333
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India
Has thanked: 2 times

Re: Excel an coordinates

Post by anserkk »

Code: Select all | Expand

nRow:=oExcel:ActiveCell:Row
nColumn:=oExcel:ActiveCell:Column


Regards
Anser
Marc Vanzegbroeck
Posts: 1163
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium
Contact:

Re: Excel an coordinates

Post by Marc Vanzegbroeck »

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: Select all | Expand

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
User avatar
anserkk
Posts: 1333
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India
Has thanked: 2 times

Re: Excel an coordinates

Post by anserkk »

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: Select all | Expand

oRange:=oSheet:Range("J8")
oExcel:ActiveSheet:Shapes:AddPicture("TEST.BMP",.F., .T., oRange:Left, oRange:Top, 640, 400)
 


Regards
Anser
Marc Vanzegbroeck
Posts: 1163
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium
Contact:

Re: Excel an coordinates

Post by Marc Vanzegbroeck »

Thanks Anser,

This is just what I wanted!!

Regards,
Marc
Regards,
Marc

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