3. python file Manipulation tool Xlsxwriter Tools

Source: Internet
Author: User
# _*_ Encoding:utf-8 _*_

Import Xlsxwriter

#创建xlsx后缀名的excel
Excel = Xlsxwriter. Workbook (R ' D:\github\file\xlswrite_test.xlsx ')

#添加sheet页名称
Sheet = excel.add_worksheet (' Device name ')

#设置行宽, Row height
Sheet.set_column (' A:c ', 30)
#设置excel样
Bold = Excel.add_format ({' Bold ': True})

#向excel写数据
Sheet.write (' A1 ', ' Hello ')

#向excel写数据, and set bold style
Sheet.write (' A2 ', u ' Hello ', bold)
Sheet.write (' B3 ', ' *&^%$#@! ')

Sheet.write (3,0,32)
Sheet.write (4,0,35.5)
Sheet.write (5,0, ' =sum (A4:A5) ')

#关闭excel
Excel.close ()


3. python file Manipulation tool Xlsxwriter Tools

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.