5, 'test.png')
worksheet.insert_image(0, 5, 'test.png', {
'url': 'http://httpbin.org/'})
e)写入日期...行高设置为40
worksheet.set_row(0, 40)
# 设置列属性,把A到B列宽设置为20
worksheet.set_column('A:B', 20)
4、自定义格式:
常用格式:
字体颜色...:color
字体加粗:bold
字体大小:font_site
日期格式:num_format
超链接:url
下划线设置:underline
单元格颜色:bg_color
边框:border
对齐方式...': 'cccccc'})
worksheet.write('A3', "python excel", f)
worksheet.set_row(0, 40, f)
worksheet.set_column...('A:E', 20, f)
5、批量往单元格写入数据
# 批量往单元格写入数据
worksheet.write_column('A15', [1, 2, 3, 4, 5]) # 列写入,从A15开始