from __future__ import print_function
from xlwt import Workbook, easyxf
from xlwt.Utils import rowcol_to_cell


row = easyxf('pattern: pattern solid, fore_colour blue')
col = easyxf('pattern: pattern solid, fore_colour green')
cell = easyxf('pattern: pattern solid, fore_colour light_blue;'
                              'font: colour white, bold True;')

book = Workbook(encoding='UTF-8')
help(book)
print(book.country_code)
print(book.tab_width)
book.set_owner('DicoGIS')
print(book.owner)

# book.encoding = 'UTF-8'
print(book.encoding)

sheet = book.add_sheet('Precedence')


for i in range(0,10,2):
    sheet.row(i).set_style(row)

for i in range(0,10,2):
    sheet.col(i).set_style(col)

for i in range(10):
    sheet.write(i,i,'YOUPI',cell)