3 ms·
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.
by shadowgovt 6y ago
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.
- TeMPOraL 6y agoI'm betting the exporter isn't running out of file, but out of loop counter.
- shadowgovt 6y agoI mean, same difference. "I cannot generate a file representing state of data in RAM" is a 'fail noisy' error, not a 'fail silent' error.
- TeMPOraL 6y ago(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.