2.4.63 BrtBeginECParam

The BrtBeginECParam record specifies parameters of an external connection (section 2.2.8) and specifies the beginning of an empty collection of records as defined by the External Data Connections (section 2.1.7.24) part ABNF.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

pbt

A

reserved

wTypeSql

dataType (optional)

fLoadPrompt (optional)

stName (variable)

...

stPrompt (variable)

...

stVal (variable)

...

xnumVal (optional)

...

boolVal (optional)

fmla (variable)

...

pbt (3 bits): An unsigned integer that specifies the type of the parameter. This value MUST be one of the values from the following table.

Value

Meaning

0x0

Prompt. An application collects the parameter value from the user.

0x1

Value. This record contains the value in one of the fields: stVal, xnumVal, or boolVal.

0x2

Cell reference. fmla specifies the sheet cell that contains the value.

A - fAutoRefresh (1 bit): A bit that specifies whether the external data is automatically refreshed when the content of a cell containing the parameter's value changes. This value MUST be 0 if pbt is not 0x2. The following table specifies the meaning of each value.

Value

Meaning

0

External data is refreshed only when requested by the user or when triggered by some other event (for example, the workbook is opened).

1

External data is refreshed whenever the content of a cell containing the parameter's value changes.

reserved (12 bits): This value MUST be 0, and MUST be ignored.

wTypeSql (2 bytes): A TypeSql (section 2.5.152) that specifies the SQL data type of the parameter. This value MUST be ignored when the external connection is not an ODBC data source.

dataType (4 bytes): An optional unsigned integer that specifies the data type of the parameter value. This field MUST exist if and only if pbt is not 0x0 and MUST be ignored if pbt is 0x2. This value MUST be one of the values in the following table.

Value

Meaning

0x00000001

Double. The parameter value is specified by the xnumVal field.

0x00000002

String. The parameter value is specified by the stVal field.

0x00000004

Boolean. The parameter value is specified by the boolVal field.

0x00000800

Integer. The parameter value is specified by the xnumVal field.

fLoadPrompt (4 bytes): An optional Boolean (section 2.5.98.3) that specifies whether stPrompt exists after the fixed size portion of the record. If the value is 1, stPrompt exists. fLoadPrompt MUST exist if and only if pbt is 0x0.

stName (variable): An XLWideString (section 2.5.169) that specifies the name of the parameter. The length of this value MUST be less than 256 characters.

stPrompt (variable): An optional XLWideString that specifies the prompt string for the parameter. The length of this value MUST be less than 65536 characters. This field MUST exist if and only if pbt is 0x0 and fLoadPrompt is 0x00000001.

stVal (variable): An optional XLWideString that specifies the string value of the parameter. The length of this value MUST be less than 256 characters. This field MUST exist if and only if pbt is 0x1 and dataType is 0x00000002.

xnumVal (8 bytes): An optional Xnum (section 2.5.172) that specifies the value of the parameter. This field MUST exist if and only if pbt is 0x1 and dataType is 0x00000001 or 0x00008000. If dataType is 0x00008000, the integer value specified by this field MUST be less than or equal to 0x7FFFFFFF and greater than or equal to 0x80000000.

boolVal (1 byte): An optional BYTE that specifies the Boolean value of the parameter. This field MUST exist if and only if pbt is 0x1 and dataType is 0x00000004.

fmla (variable): An optional ParameterParsedFormula (section 2.5.98.14) that specifies the formula (section 2.2.2) that MUST evaluate to the range containing the value or values to use for the parameter. If this is an ODBC connection (section 2.2.8.4), the cell range MUST specify a single cell. If this is a Web connection (section 2.2.8.5), the cell range MUST specify a single row or a single column (1) of cells; each cell of the range can contain one of the parameter values. This field MUST exist if and only if pbt is 2.