Information générale
Catégorie:
Gestionnaire de rapports & Rapports
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.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement