Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Exporting to an Excel template file
Message
De
18/07/2005 12:41:10
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows '98
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01032719
Message ID:
01033576
Vues:
13
>Heck, I feel just like Private Forrest Gump, a genius, with all of this new knowledge. Okay, so I am exaggerating a bit.
>
>I have one last question:
>
>How do you do borders, similar to an underline, but not an underline. I wanted to make the signature have a border on it. By the way, where do you find all of these MS Office properties, commands, etc.?
lcXLS = Sys(5)+Curdir()+'customer.xls'
Use customer
Copy To (m.lcXLS) Type Xls
Use

* Line styles
#Define xlContinuous	1
#Define xlDash	-4115
#Define xlDashDot	4
#Define xlDashDotDot	5
#Define xlDot	-4118
#Define xlDouble	-4119
#Define xlSlantDashDot	13
#Define xlLineStyleNone	-4142

* Border index
#Define xlInsideHorizontal	12
#Define xlInsideVertical	11
#Define xlDiagonalDown	5
#Define xlDiagonalUp	6
#Define xlEdgeBottom	9
#Define xlEdgeLeft	7
#Define xlEdgeRight	10
#Define xlEdgeTop	8

* Weight
#Define xlHairline	1
#Define xlMedium	-4138
#Define xlThick	4
#Define xlThin	2

oExcel = Createobject('Excel.Application')
With oExcel
  .Workbooks.Open(lcXLS)
  .Visible = .T.
  With .ActiveWorkbook.ActiveSheet.UsedRange
    With .Borders
      .LineStyle = xlDouble
      .ColorIndex = 5
    EndWith
    With .Borders(xlInsideVertical)
      .LineStyle = xlContinuous
      .Weight = xlThin
      .ColorIndex = 7
    Endwith
    With .Borders(xlInsideHorizontal)
      .LineStyle = xlContinuous
      .Weight = xlMedium
      .ColorIndex = 3
    Endwith
  EndWith
Endwith
If you installed VBA help during installation check for a file named VBA_XL*.* or VBAXL*.* under Office folder (location and exact name changes with version. chm or hlp).
You can get full list of constants using object browser.
Oopps VFP6. I think object browser wasn't available in that version (first in VFP7?).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform