Thursday, March 31, 2016

LinqToExcel Microsoft 255 character limit

I had a spreadsheet that was using LinqToExcel to read an Excel (xlsx) file. It was hitting the Microsoft 255 character limit because the first X number of rows don't exceed 255 characters so it was not expecting to have a problem with any of the rows. However, the problem row was at the end of the file. To fix this I had to increase the number of rows sample to All rows:
In the regedit:
Depends if 64-bit or 32-bit installed (my local was 32-bit):
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Access Connectivity Engine\Engines\Excel\
or
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Office\14.0\Access Connectivity Engine\Engines\Excel\
TypeGuessRows set to 0