Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create a title for a workshseet that is created from a t
Message
From
05/09/2003 10:45:22
 
 
To
05/09/2003 08:53:14
Olatunji Beckley
O. A. Beckley Ventures
Nigeria
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00826363
Message ID:
00826423
Views:
22
This message has been marked as the solution to the initial question of the thread.
Hi Olatunji,

The below is more than you asked for but it inserts rows above the copy/exported file, inserts title and date and modifies the column headings.

If you need more assistance let me know. Good luck.

Paige

oExcel = CREATEOBJECT("Excel.Application")
oExcel.Visible = .T.
oWorkbook = oExcel.Workbooks.open(ExportPath)
WITH oExcel
&& Insert 3 rows:
.Cells(1,1).Value=[Insert row above this line]
.Range("A1").Select
.Selection.EntireRow.Insert
.Range("A2").Select
.Selection.EntireRow.Insert
.Range("A3").Select
.Selection.EntireRow.Insert
.Range("A4").Select
.Selection.EntireRow.Insert
*
.Range("B2").Select
.WorkSheets(1).Pictures.Insert(CSCLogo)
.WorkSheets(1).PageSetup.Orientation = xlLandscape
*
&& Insert 2 line title:

DO CASE
CASE lcCli_Rept = "N1"
.Range("F1").Value = "NON OMPLIANT POLICIES REPORT"
.Range("J1").Value = "Date: "+DTOC(DATE())
.Range("F2").Value = " For"
.Range("F3").Value = lcCli_Name
&& Replace column headings and adjust size:
.Range("A5").Value = "Client"
.Range("B5").Value = lcIns_Labl+" Id"
.Range("C5").Value = "Issued"
.Range("D5").Value = "Expired"
.Range("E5").Value = "Type"
.Range("F5").Value = "Prefix"
.Range("G5").Value = "First Name"
.Range("H5").Value = "Middle"
.Range("I5").Value = "Last Name"
.Range("J5").Value = "Property Description"
.Range("K5").Value = "ES Codes"
CASE lcCli_Rept = "P1"
.Range("D1").Value = "NON COMPLIANT POLICIES REPORT"
.Range("G1").Value = "Date: "+DTOC(DATE())
.Range("D2").Value = " For"
.Range("D3").Value = lcCli_Name
&& Replace column headings and adjust size:
.Range("A5").Value = "Client"
.Range("B5").Value = lcIns_Labl+" Id"
.Range("C5").Value = "Issued"
.Range("D5").Value = "Expired"
.Range("E5").Value = "Type"
.Range("F5").Value = "Insured Party"
.Range("G5").Value = "Property Description"
.Range("H5").Value = "ES Codes"
*
ENDCASE


etc. etc, etc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform