Advertisement
Guest User

Untitled

a guest
Jul 7th, 2015
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. import xlrd
  2. from xlutils.copy import copy
  3. from openpyxl import load_workbook
  4.  
  5. if file_format == 'xls':
  6. input_file=xlrd.open_workbook(input_file_location,formatting_info=True)
  7. wb = copy(input_file)
  8. wb.save(destination_file)
  9. if file_format == 'xlsx' or file_format == 'xlsm' :
  10. input_file = load_workbook(formula_file,data_only=True)
  11. input_file.save(destination_file)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement