+ Reply to Thread
Results 1 to 7 of 7

Help with Excel to HTML then Upload to FTP

  1. #1
    Registered User
    Join Date
    05-01-2011
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    29

    Question Help with Excel to HTML then Upload to FTP

    Hi, Hoping someone can help I would like to save a copy of my excel workbook as html then upload all the files (HTML & XLS) to FTP Server. At the min the script I have does save as html however it only sends the .xls file to ftp server. How do I get the html files to send along with the folder that is created when saving as html.

    Files to send
    NightRota.xls
    NightRota.html
    -NightRota_files (folder created when saving as html)
    --Sheet1
    ---Sheet2, etc

    Please Login or Register  to view this content.
    Thank You

  2. #2
    Valued Forum Contributor
    Join Date
    05-21-2009
    Location
    Great Britain
    MS-Off Ver
    Excel 2003
    Posts
    550

    Re: Help with Excel to HTML then Upload to FTP

    Repeat the Send command for the .html file and use mput for the files in the subfolder, for example:
    Please Login or Register  to view this content.
    The above puts the files in the current remote folder; if you want to put them in a NightRota_files subfolder on the remote system (to match your local computer), use the mkdir command to create the folder.

    To disable prompting for each file when mput runs, use the prompt command or the -i ftp command line option.
    Post responsibly. Search for excelforum.com

  3. #3
    Registered User
    Join Date
    05-01-2011
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    29

    Re: Help with Excel to HTML then Upload to FTP

    Thank You so simple :D

    I have stumbled on another issue the workbook is saved to a network drive (UNC) the command line script does not work I get an error saying cannot use UNC directory is there any other scripts that I could use to avoid this command line issue.

    Thanks Again

  4. #4
    Valued Forum Contributor
    Join Date
    05-21-2009
    Location
    Great Britain
    MS-Off Ver
    Excel 2003
    Posts
    550

    Re: Help with Excel to HTML then Upload to FTP

    Use ThisWorkbook.SaveCopyAs or ActiveWorkbook.SaveCopyAs to save the workbook to your local hard drive and send that instead of the network drive version.

    If saving locally isn't an option, post your code and say which line gives the error and the exact error message.

  5. #5
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Help with Excel to HTML then Upload to FTP

    some less code will be sufficient:

    Please Login or Register  to view this content.



  6. #6
    Registered User
    Join Date
    05-01-2011
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    29

    Re: Help with Excel to HTML then Upload to FTP

    Hi Thanks for your responsive, Sorry for delay in replying I don't seem to received email notification from forum.

    I tried to use the code you suggested SNB however received an error stating Syntax error something I missed? I added the required information username,password etc.

    Cheers

    Update

    Fixed initial error using code below however I now get another error, screenshot below.

    Please Login or Register  to view this content.
    Capture.PNG
    Last edited by Nick.123; 08-28-2012 at 02:01 PM. Reason: Update

  7. #7
    Registered User
    Join Date
    05-01-2011
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    29

    Re: Help with Excel to HTML then Upload to FTP

    Quote Originally Posted by Chippy View Post
    Use ThisWorkbook.SaveCopyAs or ActiveWorkbook.SaveCopyAs to save the workbook to your local hard drive and send that instead of the network drive version.

    If saving locally isn't an option, post your code and say which line gives the error and the exact error message.
    Hi, This is the script I'm using
    Please Login or Register  to view this content.
    I get the error from bat script as I'm trying to run it from UNC I can not run the script from local drive.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1