Skip to content

write.table only writes the first 256 variables/columns

3 messages · root, Giles Innocent, Marc Schwartz

#
Thanks. I was "believing" an Excel import of the file - as you say, a
re-import
into R still has 333 columns. I shall look elsewhere for the cause of the
mysterious truncation.

Stuart
#
Excel only imports the first 256 columns as standard (not sure if you 
can increase this).  I had a similar problem importing a database 
recently - I just gave up using Excel, used R instead.

Giles
On 2003.05.23 15:43 Stuart Leask wrote:
#
You cannot increase the column/field limit in any of the MS Office
products.

At least for the desktop MS applications (and presumably for all ODBC
based driver interactions) there is a 255 column limit in the CREATE
TABLE SQL query as part of the ODBC limitations.

A reference is here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcjetsdk_149.asp

The major changes in recent versions of Excel relative to sheet size was
to increase the number of rows, which in Excel XP (2002) is 65,536 rows
by 256 columns.

HTH,

Marc Schwartz
On Fri, 2003-05-23 at 10:02, Giles Innocent wrote: