FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour row height in excel
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
row height in excel
Posted: Fri Jun 01, 2012 09:31 AM

Hello,

After filling all fields in excel I do a AutoFit().
Is the a way to assign a minimum height to a row.

After the Autofit() I want to read the height of the row, and if it is to small a want to give it a fixed height.

Thanks,
Marc

Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: row height in excel
Posted: Fri Jun 01, 2012 09:40 AM

include "fivewin.ch"

FUNCTION MAIN

LOCAL oExcel
LOCAL oAs

oExcel := CreateObject( "Excel.Application" )

oExcel:WorkBooks:Add()

oAS := oExcel:ActiveSheet()

oAs:Range( "A1" ):Value := 10

oAS:Columns( "A" ):AutoFit()

oExcel:Visible := .T.
inkey(3)

oAs:Range( "A1" ):RowHeight := 30

RETURN NIL

Marco Boschi
info@marcoboschi.it
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Re: row height in excel
Posted: Fri Jun 01, 2012 11:02 AM

Thanks Marco,

It's working fine.

Marc

Regards,

Marc



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

Continue the discussion