I must create a process that FTPs a CSV file. The table receiving the file has been structured so that it rejects all files with blank rows (this is out of my control). Saving Excel files as .csv retains a blank row I cannot access or delete in any MS Office application. I can only view and delete this blank row in Notepad.

I have altered the proposed process so that:
Saves the file as .csv
Opens the file in Notepad
strikes "CTRL + END" via the sendkeys function to move the cursor to the end of the file
strikes "BACKSPACE" via sendkeys to delete the final row
strikes "CTRL + S" via sendkeys to save the file
strikes "ALT + F4" via sendkeys to close Notepad

The process then resumes as normal to FTP the file.

I have two questions.

Can you think of any reason why this method is unreliable or volatile?

Is there a better way to delete that final hidden row?

Thanks