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
Re: Execute SQL from an Excel cell (Read 5978 times)
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Re: Execute SQL from an Excel cell
27.10.05 at 15:00:20
 
The customer suggested if an if statement could be used to control the execution of the SQL in the SQLExecute function. That worked very well! I have done the following experiment:
 
A1 contains: 1
A2 contains: =sqlxl.xla!SQLQueryValueVolatile( "select count(*) from test" )
A3 contains: =if( A1=1 , sqlxl.xla!SQLExecuteVolatile( insert statement )
 
When F9 is pressed, Excel recalculates. If the value in A1 is 1 the counter in A2 is increased to show that the code in A3 is executing. If the value in A1 is set to 2 no insert is done in A3 and the value in A2 remains unchanged.
 
Sorry but I could not get the insert statement inserted into the above code. This topic refused to save with the insert statement...
Back to top
 
« Last Edit: 27.10.05 at 15:09:31 by Gerrit-Jan Linker »  

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




Posts: 75
Re: Execute SQL from an Excel cell
Reply #1 - 03.03.06 at 22:30:19
 
More Excel functions were added to SQL*XL to display database related information in Excel cells.  
See: http://www.oraxcel.com/cgi-bin/yabb2/YaBB.pl?num=1141398445
Back to top
 
 

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