Home Search

DriveWorks Pro 24
TableFormatInvariant

Send Feedback

TableFormatInvariant

Formats text found in a column in the provided table using the invariant culture.

Syntax

TableFormatInvariant(Table, Column Index, Format)

Where:

Table The table in which to perform the formatting.

Column Index The column in which to perform the formatting.

Format An Excel formatting string, for example:

  1. "0000.00" - Formats a number with up to four leading zeroes, and to two decimal places.
  2. "#.00" - Formats a number to two decimal places.
  3. "DDDDMMYY-HHMMSS" - Formats a date.

Invariant Culture

The invariant culture is culture-insensitive.

It is particularly important when specifications are run on browsers with different regional cultures.

When text is formatted invariantly the result is consistent across all cultures.

To format a table using the regional culture see TableFormat.

Examples

Example 1

TableFormatInvariant(DWLookupCurrency,4,"MMM-YY")

Will return an array from the Currency table (see Example Data below), with the values in column 4 returned in the month-year format.

CountryCurrencyRateDate
FranceEuro1.3Mar-15
United StatesDollar1.4Feb-15
GermanyEuro1.3Jan-15
United KingdomPound1Jul-14

DriveWorks will return the table above as an array, which will look like:

Table returned as an Array
{"Country","Currency","Rate","Date";"France","Euro","1.3","Mar-15";"United States","Dollar","1.4","Feb-15";"Germany","Euro","1.3","Jan-15";"United Kingdom","Pound","1","Jul-14"}

Example 2

TableFormatInvariant(DWLookupCurrency,3,"0.0%")

Will return an array from the Currency table (see Example Data below), with the values in column 3 formatted as a percentage.

CountryCurrencyRateDate
FranceEuro1.3%29/03/15
United StatesDollar1.4%18/02/15
GermanyEuro1.3%22/01/15
United KingdomPound1.0%15/07/14

DriveWorks will return the table above as an array, which will look like:

Table returned as an Array
{"Country","Currency","Rate","Date";"France","Euro","1.3%","29/03/2015";"United States","Dollar","1.4%","18/02/2015";"Germany","Euro","1.3%","22/01/2015";"United Kingdom","Pound","1.0%","15/07/2014"}

Example Data

Currency Table (DWLookupCurrency)

The original table without any formatting.

CountryCurrencyRateDate
FranceEuro1.329/03/15
United StatesDollar1.418/02/15
GermanyEuro1.322/01/15
United KingdomPound115/07/14

See Also

For more information on formatting strings please see the Microsoft article TEXT function.

Other functions that use the invariant culture

TextInvariant - Formats the given value according to an Excel formatting string using the invariant culture.

TextFormatInvariant - Formats one or more values invariantly according to the given formatting string.

Functions that use regional culture

Text - Formats the given value according to an Excel formatting string.

TextFormat - Formats one or more values according to the given formatting string using .NET framework 4 standard format strings.

TableFormat - Applies a format to all values in a specified column of a table.