Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import xlrd
- from xlutils.copy import copy
- from openpyxl import load_workbook
- if file_format == 'xls':
- input_file=xlrd.open_workbook(input_file_location,formatting_info=True)
- wb = copy(input_file)
- wb.save(destination_file)
- if file_format == 'xlsx' or file_format == 'xlsm' :
- input_file = load_workbook(formula_file,data_only=True)
- input_file.save(destination_file)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement