I would like to copy and paste one sheet to another using xlwings in python while keeping the source formatting. The code which I have found below copy and pastes the ranges but only the values. Please can someone help me modify the code to preserve source formatting
import xlwings as xw
wb = xw.Book('mybook.xlxs')
my_values = wb.sheets['Sheet1'].range('A1:A6').options(ndim=2).value
wb.sheets['Sheet2'].range('A1:A6').value = my_values
Thanks!