Linker IT Software
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
Automate insert multiple rows (Read 2070 times)
Gerrit-Jan Linker
YaBB Administrator

Posts: 75
Automate insert multiple rows
06.04.10 at 16:36:39
Automate insert multiple rows
Hi. Am currently evaluating sqlxl.

Is it possible to automate the insert multiple rows functionality.

e.g. can it be saved and use a macro etc.. to rerun it?

Can you advise on how to do this in sqlxl.

Yes, this can be very easily done by recording a macro while you do the insert. Ensure the SQL*XL program option to enable macro recording is enabled (see the General section of the Program preferences):

Sub Macro1()
    SQLXL.InsertRecordset Table:="authors", Columns:="Au_ID,Author,[Year Born]", DataRange:=Range("$B$6:$D$9"), PromptOnError:=False, SortToStatus:=True, CommitFrequency:=50, Orientation:=1, Silent:=True, Feedback:=True
End Sub

This macro will insert the data in B6Cheesy9 into the columns Au_id, Author and Year Born of the Authors table. The options include to not prompt for errors, to sort the results to status, to use a commitfrequency of 50, the the row orientation = 1 (horizontal) and to create the feedback column (succesfull or error message).
Back to top
« Last Edit: 06.04.10 at 16:39:17 by Gerrit-Jan Linker »  

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1