PinoyDev -3 Posting Whiz in Training

Good day!

I just need to pull all the records in table named "cusname" in sql server to an existing excel worksheet which is located in the folder where my program reside.The name of the existing excel worksheet is "excelcusname". I need to put the records in column C, row 5 and up in sheet3 of the existing excel spreadsheet.

My recordsets for retrieving the data in sql server works fine but i dont know how to pull it to existing excel worksheet. Pls help. My code below.

objCommand.CommandText = "Select [loanname] from loanlist"
objCommand.CommandTimeout = 600
objCommand.CommandType = adCmdText

Set objRS = objCommand.Execute

...code to export to existing excel..

Thank you for your time.!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.