I've been bitten by this exact issue (albeit on non critical data), save a file as XLS it will silently drop rows beyond 65k - save it as XLSX and it's all good..
The silent part there is the real surprising part to me. You'd think the exporter would die noisily if it still had data in the buffer and it ran out of file.
(EDIT: numerous comments point out that Excel displays an explicit warning when truncating data above 256x65k. This comment was written under the assumption that it doesn't.)
Not if it was a bug in the code. 65k sounds suspiciously close to the limit of 16 bit unsigned int.
I'm guessing the exporter looked roughly like:
int exportRow( ... ) {
if( /* can't export or no more rows */ ) {
return 0;
}
/* export row */
return ++someInternalCounter;
}
void export( ... ) {
unsigned short nextRow = 0;
do {
nextRow = exportRow(...);
} while(nextRow > 0);
}
In the above example, the export would silently stop after 65k entries.
The way people write C in the wild, this wouldn't surprise me in the slightest. And with Microsoft being all about backwards compatibility, Excel probably defers to some ancient and long forgotten code when exporting to XLS.
Yep, I'm positive but as said elsewhere this is a few years back. I recall sending the data out and getting some pretty stern feedback (this is why I recall it) Didn't make the mistake after that...