Possible to define Font-Width for Export to Excel ? (solved)

Possible to define Font-Width for Export to Excel ? (solved)

Postby ukoenig » Fri Mar 26, 2010 4:38 pm

Hello,
I'm busy, testing the Excel-VBA-Commands.

The Font-Objects are defined like :

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

Image

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

Image

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

Best Regards
Uwe :lol:
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Possible to define Font-Width for Export to Excel ? (solved)

Postby ukoenig » Sat Mar 27, 2010 6: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:Shapes:AddTextEffect( 7, "My Headline", "Arial Black", 36, .F. , .T., 20, 50 ):Select()

Image

Best Regards
Uwe :lol:
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Possible to define Font-Width for Export to Excel ? (solved)

Postby ukoenig » Sat Mar 27, 2010 6:30 pm

It is not possible, to change the Width of a normal Font.
It has to be done with using a Wordart :

oSheet:Shapes: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:Shapes:Range:Fill:Visible := .T.
*oSelection:Shapes:Range:Fill:Solid := .T.
*oSelection:Shapes:Range:Fill:ForeColor:SchemeColor := 48
*oSelection:Shapes:Range:Fill:Transparency := 0.4
*oSelection:Shapes:Range:Line:Weight := 0.75
*oSelection:Shapes:Range:Line:DashStyle := LineSolid
*oSelection:Shapes:Range:Line:Style := LineSingle
*oSelection:Shapes:Range:Line:Transparency := 0
*oSelection:Shapes:Range:Line:Visible := .F.

Image

Best Regards
Uwe :lol:
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Marc Venken and 111 guests