如何绕过Excel的URL限制?

时间:2021-04-26 22:20:03

I'm using the excellent xlsxwriter to build spreadsheets with Python. I've become aware of the issue where you can only write 40k or so URLS to a sheet before you start getting warned and the functionality is gated.

我正在使用优秀的xlsxwriter来使用Python构建电子表格。我已经意识到这样一个问题,即在开始收到警告并且功能被门控之前,你只能在表单上写入40k左右的URL。

Is there a way to write the urls as strings in such a way that the Excel application will not interpret the url as a string on open (and therefore allow me to add unlimited urls)? I get that those URLs won't be clickable, but it's better than nothing in this case for me.

有没有办法将URL作为字符串写入,以便Excel应用程序不会将URL解释为打开时的字符串(因此允许我添加无限制的URL)?我知道这些网址不会被点击,但在这种情况下,对我来说总比没有好。

1 个解决方案

#1


6  

Excel's limit is around 65k urls per worksheet. XlsxWriter warns if you exceed that.

Excel的限制是每个工作表约65k url。如果你超过这个,XlsxWriter会发出警告。

Is there a way to write the urls as strings in such a way that the Excel application will not interpret the url as a string on open (and therefore allow me to add unlimited urls)

有没有办法将URL写为字符串,以便Excel应用程序不会将URL解释为打开时的字符串(因此允许我添加无限的URL)

XlsxWriter has a constructor option to turn off conversion of strings to urls:

XlsxWriter有一个构造函数选项来关闭字符串到url的转换:

workbook = xlsxwriter.Workbook(filename, {'strings_to_urls': False})

#1


6  

Excel's limit is around 65k urls per worksheet. XlsxWriter warns if you exceed that.

Excel的限制是每个工作表约65k url。如果你超过这个,XlsxWriter会发出警告。

Is there a way to write the urls as strings in such a way that the Excel application will not interpret the url as a string on open (and therefore allow me to add unlimited urls)

有没有办法将URL写为字符串,以便Excel应用程序不会将URL解释为打开时的字符串(因此允许我添加无限的URL)

XlsxWriter has a constructor option to turn off conversion of strings to urls:

XlsxWriter有一个构造函数选项来关闭字符串到url的转换:

workbook = xlsxwriter.Workbook(filename, {'strings_to_urls': False})