Skip to content

Handling the 65,530 hyperlinks limit in Excel. #475

Open

Description

@joshuapinter

We're running into issues with some of Excel exports where we're exceeding the 65,530 hyperlinks hard limit in Excel and it's causing a warning message to be displayed when Excel opens the .xlsx file.

I tried to look through the repo to see if this had been handled or talked about before but didn't find anything.

I'm wondering if you had any ideas on how best to deal with this? I'm thinking it would be useful to keep some kind of a hyperlink count in the library itself for each Worksheet that would just disable (maybe with a console warning) any hyperlinks after that hard limit is reached.

Let me know your thoughts.

Thanks!

Activity

  1. joshuapinter commented on Mar 4, 2026

    @joshuapinter
    Author

    After more careful testing and consideration, we've created a PR that does two main things:

    1. Ensures we don't create more hyperlinks after the 65,530 per-worksheet limit is reached. This ensures we don't get a warning message when opening the file. A log message is also added to identify this but the Excel generation proceeds normally, just not with any more hyperlinks.

    2. Using the HYPERLINK formula does not contribute to this 65,530 per-worksheet limit so we detect when the contents of a cell when using add_cell is a URL (and no formula is provided) it will use the HYPERLINK formula to make the cell clickable, which is a nice touch and what people would likely want.

    We're going to use our fork in Production but I would much prefer to get these merged in upstream so we can use your master branch again so let me know what else needs to be done here.

    Thanks!

    Joshua

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions