Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Excel Row count with AcvtiveX Script (DTS) Expand / Collapse
Author
Message
Posted Friday, January 16, 2009 1:10 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Saturday, July 11, 2009 6:14 PM
Points: 1, Visits: 22
After opening excel sheet how do I get the row counts on the opened worksheet.

Please Note: I can't use SQL task to get the count.

Dim ex_app
Dim ex_wbook
Dim ex_wksheet
Dim sFilename

sFilename = DTSGlobalVariables("gv_ExcelFilename").Value

' Create the Excel Object
Set ex_app = CreateObject("Excel.Application")

' Open up the Excel Spreadsheet
Set ex_wbook = ex_app.Workbooks.Open(sFilename)

' Which sheet do we get our data from
Set ex_wksheet = ex_wbook.Worksheets(1)

After this point, I couldn't proceed.

Experts please shed some light on this.


Thanks

RK
Post #637788
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse