Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel insert row
Message
 
 
To
16/07/2001 12:41:28
Bob Clark
Complus Data Service, Inc.
St. Petersburg, Florida, United States
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00410003
Message ID:
00531078
Views:
35
>oExcel=createobject('Excel.Application')
>With oExcel
> .Workbooks.Open(sys(5)+curdir()+'schedcrossxls.xls')
> .visible = .t.
> .Selection.Insert(-4121)
>
>inserts a single cell....how would I insert an entire row?

From the Excel VBA help file:

This example inserts a new row before row four on Sheet1.
Worksheets("Sheet1").Rows(4).Insert

In your example, it would be:

oexcel.ActiveSheet.Rows(some row here).Insert
   or
oexcel.Worksheets(1).Rows(some row here).Insert

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform