I have an xlsx template from Dynamics NAV which I can use to import my data to system.
When I write my data in the template and try to import in NAV I receive an error saying the "The Excel workbook must contain an XML map."
The original file has its XML map attached. But when I edit with my data and save this mapping gets lost.
import openpyxl
wb = openpyxl.load_workbook("sheet.xlsx")
sheet = wb.active
sheet["A4"].value = 'Test'
sheet["B4"].value = '1234'
wb.save('test.xlsx')
wb.close()
Is there a way where I can write new data in the xlsx file and save the changes without losing it?