import openpyxl
# Load the Excel workbook
workbook = openpyxl.load_workbook('input.xlsx')
# Select the desired worksheet
worksheet = workbook['Sheet1']
# Create a new workbook to store the copied values
new_workbook = openpyxl.Workbook()
new_worksheet = new_workbook.active
# Iterate through each cell in the source worksheet
for row in worksheet.iter_rows():
for cell in row:
# Copy the value from the source cell to the destination cell
new_worksheet[cell.coordinate].value = cell.value
# Save the new workbook with only values
new_workbook.save('output.xlsx')