Hacker News new | past | comments | ask | show | jobs | submit login

(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.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: