Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- #
- from openpyxl import Workbook
- libro = Workbook()
- # grab the active worksheet
- hoja = libro.active
- # Data can be assigned directly to cells
- hoja['A1'] = 42
- # Rows can also be appended
- hoja.append([1, 2, 3])
- # Python types will automatically be converted
- import datetime
- hoja['A3'] = datetime.datetime.now()
- # Save the file
- libro.save("MUESTRA.xlsx")
Advertisement
RAW Paste Data
Copied
Advertisement