How to import data with more than 256 fields or columns into Excel (272729)
The information in this article applies to:
- Microsoft Office Excel 2003
- Microsoft Excel 2002
- Microsoft Excel 2000
This article was previously published under Q272729 SUMMARY Microsoft Excel spreadsheets have 256 columns (column IV).
Therefore, Excel cannot accept data with more than 256 fields per record on a
worksheet. When you attempt to manually import data from a database or text
file that has more than 256 fields per record, the additional fields are
truncated from the records.
You can use a Visual Basic for
Applications macro to import the data across multiple sheets. This article
provides a sample macro that imports a Comma Separated Variable (CSV) formatted
database with up to 510 fields into Excel. The macro places the first 256
fields on one sheet in the workbook and the remaining fields (beginning with
the 257th field) on a second sheet in the workbook. REFERENCES For more information about how to use the sample code in
this article, click the article number below to view the article in the
Microsoft Knowledge Base: 212536
OFF2000: How to Run Sample Code from Knowledge Base Articles
For additional information about getting help with
Visual Basic forApplications, click the article number below to view the
article in the Microsoft Knowledge Base: 226118 OFF2000: Programming Resources for Visual Basic for Applications
For additional
information about Excel specifications and limiatons, click the following
article number to view the article in the Microsoft Knowledge Base: 264626
Description of Excel 2000 specifications
Modification Type: | Major | Last Reviewed: | 6/23/2005 |
---|
Keywords: | KbVBA kbProgramming kbAutomation kbmacro kbhowto KB272729 |
---|
|