====
copy
====

This allows xlrd.Book objects to be copied into xlwt.Workbook objects
so they can be manipulated.

You may wish to do this, for example, if you have an existing excel
file:

>>> from os.path import join
>>> from xlrd import open_workbook
>>> rb = open_workbook(join(test_files,'testall.xls'))
>>> rb.sheet_by_index(0).cell(0,0).value
u'R0C0'
>>> rb.sheet_by_index(0).cell(0,1).value
u'R0C1'

Where you want to change some cells:

>>> from xlutils.copy import copy
>>> wb = copy(rb)
>>> wb.get_sheet(0).write(0,0,'changed!')

Before saving the changed workbook to a file:

>>> temp_dir = TempDirectory()
>>> temp_dir.listdir()
>>> wb.save(join(temp_dir.path,'output.xls'))
>>> temp_dir.listdir()
output.xls

This file can now be loaded using xlrd to see the changes:

>>> rb = open_workbook(join(temp_dir.path,'output.xls'))
>>> rb.sheet_by_index(0).cell(0,0).value
u'changed!'
>>> rb.sheet_by_index(0).cell(0,1).value
u'R0C1'
