vfp Excel

      数据库学习笔记 2007-4-11 15:6

aa=createobject('Excel.application')
aa.visible=.t.
aa.workbooks(1).addnew()
aa.workbooks.addnew()
aa.worksbooks.addnew()
aa.worksbook.addnew()
aa.workbooks.addnew()
aa.workbooks.addnew
aa.workbooks(1).sheets(1).addnew
aa.workbooks(1).sheets(1).addnew()
aa.workbooks.addnew
aa.workbooks.addnew()
aa.visible=.f.
aa.workbooks.addnew
aa.workbooks.add()
aa.visible=.t.
?aa.workbooks(1).sheets.count
aa.workbooks(1).sheets(1).delete
aa.workbooks(1).sheets.add
?aa.workbooks(1).sheets(1).name
?aa.workbooks(1).sheets(2).name
?aa.workbooks(1).sheets(3).name
?aa.workbooks(1).sheets(9).inset
?aa.workbooks(1).sheets(9).insert
?aa.workbooks(1).sheets(9).add
aa.workbooks(1).sheets(1).select
aa.workbooks(1).sheets.add
?type('aa')
aa.visible=.t.
aa.quit
?type('aa')
aa.visible=.t.

          Cells.Select  
          Selection.Sort   Key1:=Range("A2"),   Order1:=xlAscending,   Header:=xlGuess,   _  
                  OrderCustom:=1,   MatchCase:=False,   Orientation:=xlTopToBottom,   SortMethod   _  
                  :=xlPinYin  
          Rows("2:5").Select  
          Selection.Copy  
          Range("A27").Select  
          Sheets("Sheet1").Select  
          Sheets.Add  
          ActiveSheet.Paste  
          Sheets("Sheet1").Select  
          Rows("6:9").Select  
          Application.CutCopyMode   =   False  
          Selection.Copy  
          Sheets("Sheet1").Select  
          Sheets.Add  
          ActiveSheet.Paste  
          Sheets("Sheet1").Select  
          Rows("10:14").Select  
          Application.CutCopyMode   =   False  
          Selection.Copy  
          Sheets("Sheet1").Select  
          Sheets.Add  
          ActiveSheet.Paste  
          Sheets("Sheet1").Select   
 

标签集:TAGS:
回复Comments() 点击Count()

回复Comments

{commentauthor}
{commentauthor}
{commenttime}
{commentnum}
{commentcontent}
作者:
{commentrecontent}