python 使用xlsxwriter写入数据时,出现字符长度限制anchor > 255 ,可修改源码,取消长度限制
with link or location/anchor > 255 characters since it exceeds Excel’s limit for URLS
[2019-05-07 08:48:43] [WARNING] C:\Users\AppData\Local\Programs\Python\Python36-32\lib\site-packages\xlsxwriter\worksheet.py:912: UserWarning: Ignoring URL 'http://7xlmz4.com1.z0.glb.clouddn.com/data_upload_cook_step_2ebdee54-1d6c-4850-1b14-46db56fb9982.jpg
http://7xlmz4.com1.z0.glb.clouddn.com/data_upload_cook_step_1ffa3913-b800-39cd-6d06-cfc53c66e20a.jpg
http://7xlmz4.com1.z0.glb.clouddn.com/data_upload_cook_step_2acae613-d3be-3035-a43e-3ef1825c3457.jpg
http://7xlmz4.com1.z0.glb.clouddn.com/data_upload_cook_step_ee816e55-ff18-08e0-380d-35ba1c1767f4.jpg
http://7xlmz4.com1.z0.glb.clouddn.com/data_upload_cook_step_aeb4f129-a737-7f28-d360-72c2f9ce6759.jpg
http://7xlmz4.com1.z0.glb.clouddn.com/data_upload_cook_step_2a360b9c-c023-6347-5fad-e0365b6470dc.jpg
http://7xlmz4.com1.z0.glb.clouddn.com/data_upload_cook_step_293adfda-0780-5321-9f8b-55a3d92477b6.jpg
http://7xlmz4.com1.z0.glb.clouddn.com/data_upload_cook_step_10541f22-04cc-4d0a-f7d5-0dc0ba351cf5.jpg
http://7xlmz4.com1.z0.glb.clouddn.com/data_upload_cook_step_948449e8-a318-ffe5-1700-6004de602b5a.jpg' with link or location/anchor > 255 characters since it exceeds Excel's limit for URLS
具体操作:
- 找到源码文件worksheet C:\Users\AppData\Local\Programs\Python\Python36-32\lib\site-packages\xlsxwriter\worksheet.py:912
- 注释以下逻辑:
# Excel limits the escaped URL and location/anchor to 255 characters.
# tmp_url_str = url_str or ''
# if len(url) > 255 or len(tmp_url_str) > 255:
# warn("Ignoring URL '%s' with link or location/anchor > 255 "
# "characters since it exceeds Excel's limit for URLS" %
# force_unicode(url))
# return -3