I use excel to edit tabular data and track the changes using version control. Each time I make a change in the xls(x) I have to go to File->Export, after which the excel continues to edit the exported file instead of the xls(x).
I would like excel to automatically export a text version of my sheet every time I save my xls(x) sheet, and continue editing the xls(x). How do I achieve this?
EDIT:
I saved the file as a macro-enabled file (xlsm), enabled macros and following John Coleman's suggestions, inserted the following code (ref) into VBAProject->ThisWorkbook:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Application.DisplayAlerts = False
Dim s As String
s = ActiveWorkbook.FullName
s = Replace(s, "xlsm", "txt")
ActiveWorkbook.SaveAs Filename:=s, FileFormat:=xlText
Application.DisplayAlerts = True
End Sub
but the active workbook becomes the txt file (and excel crashed immediately after). Is there a way to export and continue editing the original file?