Excel an coordinates

Excel an coordinates

Postby Marc Vanzegbroeck » Mon May 21, 2012 6: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
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: Excel an coordinates

Postby anserkk » Mon May 21, 2012 6:35 am

Code: Select all  Expand view
nRow:=oExcel:ActiveCell:Row
nColumn:=oExcel:ActiveCell:Column


Regards
Anser
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: Excel an coordinates

Postby Marc Vanzegbroeck » Mon May 21, 2012 7: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: Select all  Expand view
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
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: Excel an coordinates

Postby anserkk » Mon May 21, 2012 8: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: Select all  Expand view
oRange:=oSheet:Range("J8")
oExcel:ActiveSheet:Shapes:AddPicture("TEST.BMP",.F., .T., oRange:Left, oRange:Top, 640, 400)
 


Regards
Anser
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: Excel an coordinates

Postby Marc Vanzegbroeck » Mon May 21, 2012 8: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
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 83 guests