Q+E: Errors Opening Text Files that Contain Blank First Row

Last reviewed: September 12, 1996
Article ID: Q98571
The information in this article applies to:
  • Q+E for Microsoft Excel for Windows, versions 3.0 and 3.0a
  • Q+E for Microsoft Excel for OS/2, version 3.0

SUMMARY

If you try to open a text file in Q+E and the first row of the text file is blank, you may receive one of the following error messages:

  • Syntax error in data type portion of SQL statement

    -or-

  • Bad Parse string

MORE INFORMATION

The text file driver in Q+E can read the following two types of text files in a Query window:

   Character Delimited
   -------------------

   A character-delimited text file contains fields separated by a
   special character (often a comma or tab). The message "Syntax error
   in data type portion of SQL statement" occurs if you attempt to
   query on two or more fields of a character-delimited text file
   that contains a blank first row.

   -and-

   Fixed Format
   ------------

   A fixed-format text file contains fields whose values start at the
   same position on each line. The message "Bad Parse string" occurs
   if you try to open any fixed-format text file whose first row is
   blank.

Workarounds

To work around this problem, do one of the following:

  • Open the text file in a text editor. Remove any blank rows that precede the first record, or field headings. If the text file does not contain field headings you can type appropriate field headings on the first row for each field. Save the file.

    -or-

  • Use Microsoft Excel to create the text file if it is a tab- or comma-delimited file. Microsoft Excel will automatically skip to the first nonblank row and nonblank column when it creates a character-delimited text file.

REFERENCES

"Q+E for Microsoft Excel User's Guide", versions 3.0 and 3.0a included with Microsoft Excel versions 3.0 and 4.0, Appendix B.


KBCategory: kberrmsg
KBSubcategory:

Additional reference words: 4.00 3.00a 3.00 4.00a



THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 12, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.