File:  [LON-CAPA] / loncom / html / adm / help / tex / Spreadsheet_Referencing_Cells.tex
Revision 1.5: download - view: text, annotated - select for diffs
Mon Aug 23 16:16:18 2010 UTC (13 years, 10 months ago) by riegler
Branches: MAIN
CVS tags: version_2_11_1, version_2_11_0_RC3, version_2_11_0_RC2, version_2_11_0_RC1, version_2_11_0, version_2_10_X, version_2_10_1, version_2_10_0_RC2, version_2_10_0_RC1, version_2_10_0, loncapaMITrelate_1, language_hyphenation_merge, language_hyphenation, HEAD, BZ4492-merge, BZ4492-feature_horizontal_radioresponse

Updating chapter 15 of cc manual.

\label{Spreadsheet_Referencing_Cells}

\textbf{Cells}

Cells may be specified by simply writing their name enclosed in either single quotes or double quotes. 
For instance, \texttt{'A17'} and \texttt{"A17"} will be
replaced with the value in row $A$ column 17 before the Perl command is evaluated.

\noindent
\textbf{Ranges}

Ranges \index{ranges, spreadsheet} specify rectangles of various shapes
in the spreadsheet, just as ranges do in traditional spreadsheets. 
Ranges must be enclosed in quotes.  Examples of legitimate ranges: 

\begin{itemize}

\item \texttt{'*'} - all rows, all columns 
\item \texttt{'B*'} - all rows in column B 
\item \texttt{'*5'} - all columns in row 5 
\item \texttt{'C5'..'F25'} - all cells in the rectangle between C5 and F25

\end{itemize}

Many functions accept ranges, see \ref{Spreadsheet_Functions}. For example, \texttt{\&SUM('d*')} will add up all cells in column $d$.

\noindent
\textbf{Special References}

There is an additional means of referencing cells most used in the 
\textbf{template row} (\ref{Spreadsheet_Template_Row}).  
By using a '\#' in the place of a row number
the spreadsheet will replace the \# with the current row number.  For example
\texttt{'B\#'} will be replaced with the contents of cell $B7$ in the row 7 and
the contents of $B8$ in row 8.

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>