Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Code for excel model
Message
De
10/11/2005 12:24:54
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
10/11/2005 11:39:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01067207
Message ID:
01067254
Vues:
15
>I just need a small code sample to do the following from VFP program: To create an Excel
>file with a single sheet, fill cells with some data from my dbf, apply colors and fonts
>to cells. Other features of Excel (like setting formulas) are not required. I do not
>want to use the command COPY TO .. TYPE XLS. Can anybody help me? Thanks in advance.

Hmm still it means a lot of versions of excel samples. Anyway this is a starter:
lcXLS = FullPath("formattest.csv")
USE customer
Copy To (m.lcXLS) type csv

oExcel = CreateObject("Excel.Application")
With oExcel
 .Workbooks.Open(m.lcXLS)
 .Visible = .T.
 With .ActiveWorkbook.ActiveSheet.UsedRange
 	.Font.Size = 14
 	.Columns.Autofit
 	.Columns(1).Interior.ColorIndex = 15
 endwith
endwith
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