FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Possible to define Font-Width for Export to Excel ? (solved)
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Possible to define Font-Width for Export to Excel ? (solved)
Posted: Fri Mar 26, 2010 04:38 PM
Hello,
I'm busy, testing the Excel-VBA-Commands.

The Font-Objects are defined like :

oSheet:Range( "A1:C2" ):Name := "Arial"
oSheet:Range( "A1:C2" ):Size := 26
oSheet:Range( "A1:C2" ):Bold := .T.
oSheet:Range( "A1:C2" ):Italic := .T.
oSheet:Range( "A1:C2" ):Color := 16776960 // background light-blue
oSheet:Range( "A1:C2" ):Color := 0 // Black



but I couldn't find something to define the Font-Width like :
oSheet:Range( "A1:C2" ):Width := 25
< Font:Width > doesn't exist.



Is it possible, to define the Font-Width ?
otherwise I will delete the Font-Width-Slider.

Best Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Possible to define Font-Width for Export to Excel ? (solved)
Posted: Sat Mar 27, 2010 06:27 PM
I found the Solution for it.

Using a normal Font, it is not possible to change the Width, like we can do in Our Applications.
We have to use it like shown in the Screenshot :

The VBA-Code :

oSheet:AddTextEffect( 7, "My Headline", "Arial Black", 36, .F. , .T., 20, 50 ):Select()



Best Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Possible to define Font-Width for Export to Excel ? (solved)
Posted: Sat Mar 27, 2010 06:30 PM
It is not possible, to change the Width of a normal Font.
It has to be done with using a Wordart :

oSheet:AddTextEffect( 7, "My Headline", "Arial Black", 36, .F. , .T., 20, 50 ):Select()

Number 7 defines the Wordart-Style ( 32 possible Styles )
20, 50 defines the Top / Left - Position

There are still more Shape-Settings.
I have to find out, how to use them in Relation to the different Wordarts.

*oSelection:Visible := .T.
*oSelection:Solid := .T.
*oSelection:ForeColor:SchemeColor := 48
*oSelection:Transparency := 0.4
*oSelection:Weight := 0.75
*oSelection:DashStyle := LineSolid
*oSelection:Style := LineSingle
*oSelection:Transparency := 0
*oSelection:Visible := .F.



Best Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.

Continue the discussion