SQL 2 Excel - Formulas PDF Print E-mail

You can write Excel formulas with SQL 2 Excel. There are 4 special substitution variables that you can use in your formulas:

{ROWID}    : Substituted with current row ID
{COLID} : Substituted with current column ID
{MINROWID} : Substituted with the minimum row ID, e.g. first data row (added in version 1.1.5)
{MAXROWID} : Substituted with the maximum row ID, e.g. last data row (added in version 1.1.5)

 

You can use simple expressions, like below, to reference rows or columns relative to the current.

{ROWID-1} : Will be substituted with current row ID - 1
{ROWID+1} : Will be substituted with current row ID + 1.

Here's an example illustrating how to write the SQL query:

SELECT ID, '=A{ROWID}*2' AS FORMULA
FROM jos_content

You need to specify which column(s) that does have formulas in them in the Worksheet configuration. In this case it's column 2 which will have a formula. We specify that in the Worksheet configuration, like this:

sql2excel_formulas_in_cols

If more then one column has formulas in them, specify the columns with a comma delimted list.

The {ROWID} will be substituted with the current row ID when the cell formula is inserted into the Worksheet. The resulting spreadsheet will contain formulas, like this:

sql2excel_formula_spreadsheet

 

 

Comments (2)add comment

mhpbkk said:

0
...
hi, is it possible to insert a sum of a column into one specific cell? eg. in the example above put the sum of column 2 into cell B12...?
 
March 21, 2010
Votes: +0

Mats @ Joomla-R-Us said:

admin
...
@mhpbkk : With SQL 2 Excel Pro you can add "Extra Cells" with data, formulas, text, results from SQL queries etc etc, at any place(s) in the spreadsheet, as long as the cell hasn't been written to before. You can't do it with the free version though.

-Mats
 
March 21, 2010
Votes: +0

Write comment

security image
Write the displayed characters


busy
 
 
  Design by augs-burg.de & go-vista.de  
 
     
 
   
 

The Joomla!(R) name is used under a limited license from Open Source Matters in the United States and other countries. http://Joomla-R-Us.com is not affiliated with or endorsed by Open Source Matters or the Joomla! Project.