Your code is certainly right. I suppose maybe two reasons: One is that you did not install MS Office components in your ftp. the second is even you install it,you have to do some complex configurations. So normally, it is not suggest to use MS Office on ftp.It is more reasonable to use other components. Here I can suggest you one MS Excel component
],it supports to read your excel data and store it on ftp also you can directly use it on ftp and avoid doing complex configurations. hope you good luck.