2.4.330 TxtQry

The TxtQry record specifies information for a text query and that specifies the beginning of a collection of ExtString records, as defined by the Worksheet substream ABNF.  The collection of ExtString records specifies the connection string for a query that retrieves external data.


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

rt

reserved

A

B

C

D

iCpidNew

E

unused1

rowStartAt

F

G

H

I

J

K

L

chCustom

unused2

itwf

chDecimal

chThousSep

rgtxtwf (variable)

...

rgchFile (variable)

...

rt (2 bytes):  An unsigned integer that specifies the record type. MUST be 0x0805.

reserved (2 bytes): MUST be zero, and MUST be ignored.

A - fFile (1 bit):  A bit that specifies that the query was generated from an import text file action.  MUST be 1.

B - fDelimited (1 bit):  A bit that specifies whether the data is delimited. MUST be a value from the following table:

Value

Meaning

0x0

The data fields are of fixed size.

0x1

The data is delimited.

C - iCpid (2 bits):  An unsigned integer that specifies the code page used for the origin of the file. This value is unused when the value of the fUseNewiCpid field is equal to 1 and the value of the iCpidNew field is greater than 2. MUST be a value from the following table:

Value

Meaning

0x0

Macintosh

0x1

Windows (ANSI)

0x2

MS-DOS (PC-8)

D - fPromptForFile (1 bit):  A bit that specifies whether a file name is prompted for on refresh. MUST be a value from the following table:

Value

Meaning

0x0

Saved file location is used during refresh

0x1

Prompt for file name on refresh

iCpidNew (10 bits):  An unsigned integer that specifies application-specific code page information that can be used to optimize text importation and can be ignored.

E - fUseNewiCpid (1 bit):  A bit that specifies whether the iCpidNew value is used for specifying the code page instead of the iCpid value.

unused1 (16 bits):  Undefined and MUST be ignored.

rowStartAt (4 bytes):  A signed integer that specifies the row in the source file where the query begins.

F - fTab (1 bit):  A bit that specifies whether the tab character is treated as a column delimiter.

G - fSpace (1 bit):  A bit that specifies whether the space character is treated as a column delimiter.

H - fComma (1 bit):  A bit that specifies whether the comma character is treated as a field delimiter.

I - fSemiColon (1 bit):  A bit that specifies whether the semi-colon character is treated as a column delimiter.

J - fCustom (1 bit):  A bit that specifies whether the custom character defined in the chCustom field is treated as a column delimiter.

K - fConsecutive (1 bit):  A bit that specifies whether consecutive delimiters are treated as one delimiter.

L - iTextDelm (2 bits):  An unsigned integer that specifies a text delimiter. MUST be a value from the following table:

Value

Meaning

0x0

Quotation mark

0x1

Apostrophe

0x2

No text delimiter

chCustom (16 bits):  An unsigned integer that specifies the custom delimiter Unicode character. This value is used if the fCustom value equals 1.

unused2 (8 bits):  Undefined and MUST be ignored.

itwf (4 bytes):  A signed integer that specifies the number of fields in each row of data. MUST be greater than 0 and less than or equal to 256.

chDecimal (1 byte):  An unsigned integer that specifies the decimal separator. MUST be a character from the ANSI character set.

chThousSep (1 byte):  An unsigned integer that specifies the thousands separator. MUST be a character from the ANSI character set.

rgtxtwf (variable): An array of TxtWf that specifies the text to column fields. The size of the array is determined by the itwf value. The array MUST NOT be empty.

rgchFile (variable):  An XLUnicodeString structure that specifies the name of the text file that is the source of the query.