Linker IT Software
Google
Web www.oraxcel.com
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
Excel output range (Read 7996 times)
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Excel output range
16.03.07 at 14:17:29
 
Excel output range
 
SQL*XL user Graham asked the following question.
 
Question:
As one of the options for Excel output - could a you allow the the output area to be created as named range? the only additional option I can think of here with this feature would be if to include the column header in the named range or not.
 
Answer:
Named ranges are not created by SQL*XL however there is a property of the SQLXL object that gives you the data range of the last queried results:
 
SQLXL.DataRange
 
This property returns an Excel range object where the returned data (without headings) can be found.
 
To try this out for yourself, run a query and then run the following macro:
sub macro1
msgbox SQLXL.DataRange.Address
End Sub

or

sub macro2
SQLXL.DataRange.Select
End Sub
Back to top
 
 

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
grahamf
YaBB Newbies
*


I Love SQL*XL

Posts: 13
Re: Excel output range
Reply #1 - 16.03.07 at 14:27:17
 

SQLXL.DataRange
 
This property returns an Excel range object where the returned data (without headings) can be found.
 
To try this out for yourself, run a query and then run the following macro:
[/quote]
IDEAL! - Saves me a lot of messing around
Thx
Graham
Back to top
 
 
  IP Logged
Pages: 1