Excel Eng French Commands
Excel Eng French Commands
html
Formulas and conditional formattings bring dynamic capabilities to Excel documents. There are a number of aspects in Excel formulas :
formulas can be written in English, or French (please contact support if you are interested in another language). This can be set with the
workbook.FormulaLanguage property. Default is : English.
the result of the formula brings a new value in the current cell or merged cells each time it gets calculated.
the operands used in the formula might be dynamic as well, for instance if cells or range of cells are involved.
formulas have an arbitrary level of complexity. Formulas can be imbricated one into another, or use complex conditions with operators like
the IF operator.
formulas can be either read or written in cells. If you are willing to know what is the formula in a cell, the Formula method from the
worksheet object tells you what it is, using the current formula language (English by default).
Introspecting cells for formulas is also possible when you want to know if the cell has a formula but you are not interested in the formula
itself. See metadata types.
formulas are calculated either in real-time or on-demand thanks to the xlsgen calculation engine.
formulas can be hidden/unhidden using a property available from the Style object interface. Hiding formulas only takes effect if the
worksheet is protected.
User-defined functions (otherwise known as add-ins) can be called. You can call user defined functions from the current workbook, or from
an external workbook.
you can remove formulas from any cell, simply by passing an empty string. Removing the formula preserves the value of the cell.
you can alternatively remove all formulas of the worksheet by making a simple call to DeleteFormulas(). Note that removing the formulas
preserves the values in cells. This technique of deleting formulas is handy if you want to hide the business logic of your spreadsheet, for
instance if the spreadsheet is meant to be distributed to a broad audience.
1 of 15 06/01/2008 3:32 PM
Formulas http://xlsgen.arstdesign.com/core/formulas.html
A formula is attached to a cell at the worksheet level (see IXlsWorksheet for more information), or in the case of merged cells, at the merged
cells object level (see IXlsMergedCells for more information).
Formulas are passed just like in Excel. Examples of formulas are as follows :
=SUM(C3:C5) // calculates the sum of the specified cell range
=IF(R1C4 > 5; "yes"; "no") // calculates a content depending on a given condition
In addition to supporting functions, xlsgen supports the following operators : +, -, *, /, =, <, <=, >, >=, <>, ^ (power), % (percent), &
(concatenation).
If the wrong number of parameters is being passed, then an error is raised. A subset of functions support an arbitrary number of parameters, for
instance the SUM function supports any number of parameters. Use the semi-colon character to separate parameters.
Formulas and parenthesis can be combined at an arbitrary level. Sometimes, you may have to explicitely add parenthesis for the parser to
resolve ambiguities. For instance, A3-A4=0 can be better understood if you pass (A3-A4)=0 instead.
numbers, floats
labels (must be double-quoted as in "content")
boolean values
cell references, R1C1 notation, or Ax notation
cell range references, R1C1:R1C1 notation, or Ax:Ax notation
relative (A1) or absolute references ($A$1 or $A1, or A$1)
defined names
The R1C1 notation is one of the two notations supported by Excel, where in RxxxCyyy xxx is a row and yyy is a column, both starting at 1. The Ax
notation is the natural Excel notation where A denotes a column (there is more than one letter after the 26th column), and x denotes a row
number starting at 1.
Functions are parsed and read using the current formula language. The default formula language is English, but xlsgen supports French as well.
See the code below for an example of how to use localized function names.
In order to produce the example in the screen above, the following code is required :
VB code
2 of 15 06/01/2008 3:32 PM
Formulas http://xlsgen.arstdesign.com/core/formulas.html
wksht.Number(3, 3) = 5
wksht.Number(4, 3) = 10
wksht.Number(5, 3) = 15
wksht.Formula(6, 3) = "=SUM(C3:C5)"
C# code
wksht.set_Number(3,3, 5);
wksht.set_Number(4,3, 10);
wksht.set_Number(5,3, 15);
wksht.set_Formula(6,3, "=SUM(C3:C5)");
C/C++ code
wksht->Number[3][3] = 5;
wksht->Number[4][3] = 10;
wksht->Number[5][3] = 15;
wksht->Formula[6][3] = "=SUM(C3:C5)";
If you'd like to write this function using French function names, you can do the following :
VB code
wksht.Number(3, 3) = 5
wksht.Number(4, 3) = 10
wksht.Number(5, 3) = 15
3 of 15 06/01/2008 3:32 PM
Formulas http://xlsgen.arstdesign.com/core/formulas.html
style.Font.Bold = True
style.Apply
C# code
wksht.set_Number(3,3, 5);
wksht.set_Number(4,3, 10);
wksht.set_Number(5,3, 15);
C/C++ code
wksht->Number[3][3] = 5;
wksht->Number[4][3] = 10;
wksht->Number[5][3] = 15;
If you call user-defined functions (otherwise known as add-ins), you must declare them first using the DeclareUserDefinedFunction method. An
example is :
' declare an external user defined function
' (Book1.xls exposes a VBA procedure called Discount1)
wksht.DeclareUserDefinedFunction("Book1.xls!Discount1")
4 of 15 06/01/2008 3:32 PM
Formulas http://xlsgen.arstdesign.com/core/formulas.html
List of supported built-in Excel functions (all functions below are supported in xlsgen for reading and writing. Only a
subset of these are supported by the xlsgen calculation engine)
Supported by the
English name French name built-in calculation Description
engine
ABS ABS X Returns the absolute value of a number
ACOS ACOS X Returns the arccosine of a number
Returns the inverse hyperbolic cosine of a
ACOSH ACOSH
number
Returns a reference as text to a single cell in a
ADDRESS ADRESSE X
worksheet
AND ET X Returns TRUE if all of its arguments are TRUE
AREAS ZONES Returns the number of areas in a reference
ASIN ASIN X Returns the arcsine of a number
ASINH ASINH Returns the inverse hyperbolic sine of a number
ATAN ATAN X Returns the arctangent of a number
ATAN2 ATAN2 Returns the arctangent from x- and y-coordinates
Returns the inverse hyperbolic tangent of a
ATANH ATANH
number
Returns the average of the absolute deviations of
AVEDEV ECART.MOYEN
data points from their mean
AVERAGE MOYENNE X Returns the average of its arguments
Returns the average of its arguments, including
AVERAGEA AVERAGEA X
numbers, text, and logical values
BETADIST LOI.BETA Returns the beta cumulative distribution function
Returns the inverse of the cumulative distribution
BETAINV BETA.INVERSE
function for a specified beta distribution
Returns the individual term binomial distribution
BINOMDIST LOI.BINOMIALE
probability
Rounds a number to the nearest integer or to the
CEILING PLAFOND X
nearest multiple of significance
Returns information about the formatting,
CELL CELLULE
location, or contents of a cell
5 of 15 06/01/2008 3:32 PM
Formulas http://xlsgen.arstdesign.com/core/formulas.html
6 of 15 06/01/2008 3:32 PM
Formulas http://xlsgen.arstdesign.com/core/formulas.html
7 of 15 06/01/2008 3:32 PM
Formulas http://xlsgen.arstdesign.com/core/formulas.html
8 of 15 06/01/2008 3:32 PM
Formulas http://xlsgen.arstdesign.com/core/formulas.html
9 of 15 06/01/2008 3:32 PM
Formulas http://xlsgen.arstdesign.com/core/formulas.html
10 of 15 06/01/2008 3:32 PM
Formulas http://xlsgen.arstdesign.com/core/formulas.html
11 of 15 06/01/2008 3:32 PM
Formulas http://xlsgen.arstdesign.com/core/formulas.html
12 of 15 06/01/2008 3:32 PM
Formulas http://xlsgen.arstdesign.com/core/formulas.html
13 of 15 06/01/2008 3:32 PM
Formulas http://xlsgen.arstdesign.com/core/formulas.html
14 of 15 06/01/2008 3:32 PM
Formulas http://xlsgen.arstdesign.com/core/formulas.html
All of functions above are supported by xlsgen for reading and writing.
Functions supported by the calculation engine (see the third column of the above table) : a subset of the over 200 built-in Excel functions are
currently supported, and support for other functions is being added on a case by case basis. In addition, xlsgen does not currently provide
calculation support for the following :
If, upon closing a workbook in Excel that was generated by xlsgen, Excel brings a prompt saying "Microsoft Excel recalculates formulas when
opening files last saved by an earlier version of Excel (than the one currently running)", then you may avoid this behavior by setting the
appropriate Excel target version. See here.
15 of 15 06/01/2008 3:32 PM