Information générale
Catégorie:
Programmation Orientée Object
Titre:
Active area in excel spreadsheet
Hello, This routine tells excel to open up an html file, then save it as a dbase file. In order for this to happen, vfp must tell excel to select the part of the spreadsheet that has data in it, else excel might only save a single row when it writes the dbf file. I am stuck on the part where vfp must tell excel to select the active area. Can anyone help?
thanks
Steve
o = CREATEOBJECT('excel.application')
eFile = "c:\test.htm"
o.Application.Workbooks.Open(eFile)
o.Visible= .T.
#define xlLastCell = 11
o.Application.Range("A1:B1").Select
&&&& <--------- the problem line is the next one
o.Application. Range("a1", ActiveCell.SpecialCell(xlLastCell)).Select
&&&& <--this last line says "Active Cell not found"
** 39 means save as a Dbase file.
o.Application.ActiveWorkBook.SaveAs(eFile,39)
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