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
Print parameters (Read 2871 times)
Gerrit-Jan Linker
YaBB Administrator

Posts: 75
Print parameters
02.02.06 at 16:57:59
Joan From Ireland asked the following question:
Is it possible to print headings on the output spreadsheet ?  
Some people would like to see at least their parameters in the heading.
I know they could do a Macro to perform this task or run a named spreadsheet which had these values in the Page Setup area but it would be ideal if I could somehow include headings in the procedure run from the Favorites option
Everyone is running the procedures at the moment from SQL Favorites as it is so easy.
There are a few ways you can print values in the sheet or in dialog boxes. I will concentrate on parameters.

  • Query the values. For example:
    select :a, :b from dual;
    select &my_number, '&my_string' from dual;

  • Display the parameters dialog. You can show the dialog through the commands: define, variable and  print. Examples:
    def a = 5;

  • Use the print command to print the value of a bind variable (e.g. :abc). Example
    Print a;
  • Use the variable command to show the definition of a bind variable. Example:
    var a;
  • Use the define command to show the definition of a substitution variable (e..g &abc). Example
    def abc = 321;
    def abc;

  • Use the prompt and pause commands to display a message box. Examples:
    prompt 'hello world';
    pause 'Check the values of the parameters';

  • Use Excel formulas to print the values of SQL*XL parameters. For example, type the following formula in a cell:

    For both formulas there is a volatile version that will execute each time Excel calculates (BindVariableVolatile and SubstitutionVariableVolatile)
Back to top
« Last Edit: 02.02.06 at 17:12:44 by Gerrit-Jan Linker »  

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