ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help with saveas ftp file problem (https://www.excelbanter.com/excel-programming/331571-help-saveas-ftp-file-problem.html)

jmoffat[_13_]

Help with saveas ftp file problem
 

I want to save my excel file onto our server using the save as ftp
function:

ActiveWorkbook.SaveAs Filename:= _
/subdir/" + fname

where fname is some user specified name.

This fails - which on closer inspection would appear to be due to excel
placing quotation marks around the filename and so when it tries to save
I get an error.

Has anyone found a way around this problem (other than using sendkeys -
which works but isn't desireable)


--
jmoffat
------------------------------------------------------------------------
jmoffat's Profile: http://www.excelforum.com/member.php...fo&userid=1151
View this thread: http://www.excelforum.com/showthread...hreadid=378484


keepITcool

Help with saveas ftp file problem
 
2 things:

it's vb not java: dont use + as concatenation but &

more importantly you need to sanitize the filename
and prepare it for urls. replace spaces with %20 etc.





--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


jmoffat wrote :

This fails - which on closer inspection would appear to be due to
excel placing quotation marks around the filename and so when it
tries to save I get an error.


jmoffat[_14_]

Help with saveas ftp file problem
 

Nope I tried it with full URL encoding and it still fails

--
jmoffa
-----------------------------------------------------------------------
jmoffat's Profile: http://www.excelforum.com/member.php...nfo&userid=115
View this thread: http://www.excelforum.com/showthread.php?threadid=37848


keepITcool

Help with saveas ftp file problem
 
hmmm.

did you read
http://support.microsoft.com/default.aspx?scid=kb;[LN];834489
A security update is available that modifies the default behavior of
Internet Explorer for handling user information in HTTP and in HTTPS
URLs


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


jmoffat wrote :


I want to save my excel file onto our server using the save as ftp
function:

ActiveWorkbook.SaveAs Filename:= _
/subdir/" + fname

where fname is some user specified name.

This fails - which on closer inspection would appear to be due to
excel placing quotation marks around the filename and so when it
tries to save I get an error.

Has anyone found a way around this problem (other than using sendkeys
- which works but isn't desireable)



All times are GMT +1. The time now is 11:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com