Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel Automation
Message
From
11/09/2000 13:25:12
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
11/09/2000 12:22:58
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00413062
Message ID:
00414990
Views:
29
>The links are referencing other sheets within the workbook. I guess I will need to use the copy() - astespecial() method. Can you assist me with this process?
>
>How did you go about learning all of the Excel automation syntax?
>The book "Microsoft Office Automation with VFP" can be purchase from http://www.hentzenwerke.com


FUNCTION _ExcelSavePasteSpecial
LPARAMETERS tcOriginal, tcSaveAs, tcSheet
#DEFINE xlPasteValues  -4163
oExcel = CREATEOBJECT('excel.application')
WITH oExcel
  .WorkBooks.Open(tcOriginal)
  .ActiveWorkbook.WorkSheets(tcSheet).Cells.Select
  .Selection.Copy
  .ActiveWorkbook.Saved = .t.
  .WorkBooks.Add
  .Selection.PasteSpecial(xlPasteValues)
  WITH .ActiveWorkbook.ActiveSheet
    .Name = lcSheet
    .Range("A1").Select
    .SaveAs(tcSaveAs)
  ENDWITH
  .Quit()
ENDWITH
I'm still learning using Excel VBA help file. Whenever I can't determine how to do something I record a macro, copy-paste macro code to VFP and retouch to fit VFP calling scheme. I think these should be covered well enough in the book.
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
Reply
Map
View

Click here to load this message in the networking platform