Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Running Excel from VFP App
Message
From
06/05/2006 10:35:45
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
06/05/2006 10:29:43
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01119766
Message ID:
01119867
Views:
17
>thanks Mr. Basoz, but the name file is not the same for each mont, in fact this must to be a parameter, how can i do it...???
If !IsClassRegistered("Excel.Application")
  Messagebox("Excel is not installed")
Else
  OpenMyXLS("C:\estaib\archivos\abril2006.xls")
Endif

Procedure OpenMyXLS(m.tcXLSFile)
  oExcel = Createobject("Excel.application")
  With oExcel
    .Workbooks.Open(m.tcXLSFile)
    .Visible = .T.
    With .ActiveWorkBook.ActiveSheet
      .Range("E:E").Numberformat = "#,##0"
      .Range("F:F").Numberformat = "#,##0.00"
      .Range("A1:F1").Font.Bold=.T.
      With .Range("A:F").Font
        .Size=10
        .Name='Tahoma'
      Endwith
      .Range("A:F").EntireColumn.AutoFit
      .Range("A1:F1").HorizontalAlignment = -4108
      .Range("A1:F1").VerticalAlignment = -4108
    Endwith
    .ActiveWorkbook.Save
  ENDWITH
endproc
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform