Question

I'm using ODBC to write to an XLSB file. Am I limited to 255 columns (or somewhere close to that)? When I try to write 500 columns I get the following error:

HY001 -1040 [Microsoft][ODBC Excel Driver] Too many fields defined.

Perhaps I have the wrong drivers? Here's my connection string:

"Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};Dbq=PATH_TO_XLSB_HERE;DefaultDir=OUTPUT_FOLDER_HERE;"
Was it helpful?

Solution

Excel 2010 itself supports 16,384 columns:

http://office.microsoft.com/en-us/excel-help/excel-specifications-and-limits-HP010342495.aspx?CTT=5&origin=HP005199291

You probably need to switch to the ACE.OLEDB ODBC provider to take advantage of them, though.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top