It all worked!
Two weird things though :
1- The excel file opens, then close.
2- When I reopen it manually, it gives me a message saying that the format of the file is different than its extension.
What about this?
Edit :
For case 1, I set objXL.Visible = False instead and it works without opening the file.
For case 2, still having the same message.
I'm adding case 3 : It adds a backup of the export excel file for some reason. Edit : I see that the backup file is the file before the column names are corrected and it has .xlk extension.
Two weird things though :
1- The excel file opens, then close.
2- When I reopen it manually, it gives me a message saying that the format of the file is different than its extension.
What about this?
Edit :
For case 1, I set objXL.Visible = False instead and it works without opening the file.
For case 2, still having the same message.
I'm adding case 3 : It adds a backup of the export excel file for some reason. Edit : I see that the backup file is the file before the column names are corrected and it has .xlk extension.
Last edited: