Copy File From/to Ftp/http Server

Sep 24, 2006

to copy files on computer which runs excell.
But is there a way to copy files from/to servers?

View 3 Replies


ADVERTISEMENT

VBA - Get / Download Excel File From Server And Copy Contents Into New Worksheet

Dec 20, 2012

For some reason the following Macro won't work:

Code:
Sub ExtractDataTest()
Dim FilePath$, Row&, Column&, Address$
'change constants & FilePath below to suit
'***************************************
Const FileName$ = "Dxo.xlsx"
Const SheetName$ = "Open"

[Code] .......

I get a run-time error '52' on line ("Bad file name or number"):

Code:
If Dir(FilePath & FileName) = Empty Then

And when location is 'C:' it works and I don't get an error.

View 2 Replies View Related

Saving A File To The Server

Jul 31, 2006

I'm trying to open a file from server.After doing all the changes I have to save the file back to the server in the same name. It is asking for save as option.it shouldn't. I want to save the file in the same path and in same name without asking the option of "Save as". I hv full permission for editing the file

View 4 Replies View Related

Open File On FTP Server

Jun 13, 2008

I try to run a macro on my workbook everytime I open it by getting the data from the ftp file. This will be the service number for my customer. Both the excel and the data file are located in the ftp, so that I can retrieve the file wherever I go. Basically I got some code from the internet which work fine on the local network, but once it come to ftp server I am stuck there.

Public Function NextSeqNumber(Optional sFileName As String, Optional nSeqNumber As Long = -1) As Long
Const sDEFAULT_PATH As String = "Ftp://mycompany.com"
Const sDEFAULT_FNAME As String = "Service.txt"
Dim nFileNumber As Long
nFileNumber = FreeFile
If sFileName = "" Then sFileName = sDEFAULT_FNAME
If InStr(sFileName, Application.PathSeparator) = 0 Then _
sFileName = sDEFAULT_PATH & Application.PathSeparator & sFileName
If nSeqNumber = -1& Then
If Dir(sFileName) <> "" Then
Open sFileName For Input As nFileNumber
Input #nFileNumber, nSeqNumber..................

View 2 Replies View Related

VLOOKUP To File Located On Server

Jan 30, 2013

How to pull data with a VLOOKUP to a file located on a Server.

My big problem is not understanding the syntax of the Server location. I've provided it below (obviously with some character changes).

I have a file located on my Hard Drive. I need to perform a VLOOKUP from A2 on this spreadsheet. The File on the Server is called "LookupTest.xls". The Range of Data is from Sheet 1 and is from A2:C4 and I need to pull the data from column C depending on what is selected from A2 from the file on my HD. I understand how to use VLOOKUP, just not when I'm pointing to another file on a Server.

Server mapping from Windows Explorer:

rbbabc$ on 'RP17409 - ABC Database (AHSSRVVN678.tge.com)'

Again, that server mapping is fake, as I changed it, but this is how it looks on Windows Explorer.

I'm trying to keep a master file of Data on a spreadsheet found on a server so that one master file can be updated, and several other tools pull from that Master File on VLOOKUP, Validation Lists, etc.

View 4 Replies View Related

List Path And File Names From FTP Server?

Jul 18, 2014

Any code that will grab the names of all files from all directories on an FTP server? I have the path & credentials to get to them, but I need a process to drop their names into a spreadsheet to compare against a list of files loaded onto a SQL database.

The directory structure on the server is subject to change, as are the number of files in each repository.

View 1 Replies View Related

Run Macro In File That Is Located On Server While Laptop Is Off?

Jul 25, 2014

I am looking to automate our daily sales report.

I am aware of the windows task scheduler.

However, I'd like for this report to run and be sent out very early in the morning (5AM) before I'm even at work.

My computer is usually off because it's with me as I'm commuting into the office.

These files are saved out on our network drive.

Is there a way I can "open" the file and run the macro I have that builds my sales reports with my computer being off?

View 2 Replies View Related

Saving File To A Specific Folder In A Server

May 22, 2009

I have a macro which saves file to a specific folder. Problem is I can save the file only in my local drive C: but not on a server for some reason.
Here is the
At home in my home computer this code worked when C: was selected.

ChDir ("c:")
Title = Application.GetSaveAsFilename(Name, "Excel files (*.xls), *.xls")
ActiveWorkbook.SaveAs Name
Save the file in specific place

But when I substituted C: path with my server path it doesnt work! Have a look. Its the exact same code except my path is different.


ChDir ("\Lnf001Lnf1vol1SharedOP_ENGWork Order")
Title = Application.GetSaveAsFilename(Name, "Excel files (*.xls), *.xls")
ActiveWorkbook.SaveAs Name

View 9 Replies View Related

Excel Macro File Which Will Fetch Data From SQL Server

Sep 30, 2013

I have created a macro file which will fetch the data from sql server. Here is the code

f Me.Cmbchoose.Value = "" Then
MsgBox "Please Choose From the drop down Menu!!", vbExclamation
Exit Sub
End If
If Me.Cmbchoose.Value = "Merchants Reports" Then
Dim oConn As ADODB.Connection

[Code] .....

The code is working fine. Now my question is that I want to access it from my home. How do I do that without DSN set up?

View 5 Replies View Related

Display Server Message To User After POST File Upload

Feb 6, 2014

I'm using VBA to upload the open workbook to app.box URL which is working great! Since I'm pretty new to VBA, I can't figure out how to get Excel to display the sucess/failed message from the server to the user. I used the VBA POST upload module from this awesome tutorial, but I can't figure out how to return the message to the user. I did figure out that on the website there is an "id="after_upload_message", not sure if that works. My code is below.

[Code] ......

View 2 Replies View Related

Cell Address And Http://local.live.com/

May 20, 2006

use an address in a cell and http://local.live.com/. i would like to paste an address into http://local.live.com/ from a cell (or concatenation) into the "Where" textbox...?

View 2 Replies View Related

Send / Receive HTTP Request - Insert Text Into Cells

Jun 28, 2013

Right now when I send/receive an HTTP request, I have the text displaying in a MSG Box. I want to just have the text inserted into cell A1 instead. I know I have to alter MsgBox MyRequest.ResponseText, but anything Ive altered it to, doesn't seem to work.

Code:
Sub http()
Dim MyRequest As Object
Set MyRequest = CreateObject("WinHttp.WinHttpRequest.5.1")
MyRequest.Open "GET", _
"Google"
' Send Request.
MyRequest.Send
'And we get this response
MsgBox MyRequest.ResponseText
End Sub

View 2 Replies View Related

Hyperlink Error: "Unable To Open [link]. The Internet Site Reports That The Item You Requested Could Not Be Found. (HTTP/1.0 404)"

Feb 23, 2010

I'm trying to build a hyperlink using text formulas in Excel but I get the following error message: "Unable to open [link]. The internet site reports that the item you requested could not be found. (HTTP/1.0 404)". The strange thing is that if I copy-paste the link in the web browser, the page opens normally (which proves the link is correct).

View 4 Replies View Related

Date Function- Open A File, Make An Exact Copy And Save It Under A New File Name

Jun 4, 2009

I'm working on the following
Workbooks.Open Filename:= _
"D:CommondataIBMmainBRANCHBURG-PRODUCTS-BOM-ALUMINUM-UPDATE-" & Ucase(Format(DateAdd("y", 0, Date)), "YYYY-MM-DD")&".XLS"
ChDir "D:CommondataIBMmain"
ActiveWorkbook.SaveAs Filename:= _
"D:CommondataIBMmainBRANCHBURG-PRODUCTS-BOM-ALUMINUM-UPDATE-NAFTA.XLS", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
ActiveWindow.Close

Date: 2009-06-03

What I'm trying too do is open a file, make an exact copy and save it under a new file name.

My problem is in the date formula the day is not always the same. In the sample case it's 03 at other times the day will change.

is there a way too get this too work irregardles of what the day might be?

View 9 Replies View Related

Sort Multiple File Data & Copy Matching Records To New File

Feb 13, 2008

This is a sample of the data with which I am working. I know that a macro can do what I need, but I am only versed in Excel formulas and not that much programming. I need to be able to first sort the data by Column C ("Element Type"), then by Columns E, F, G ("Year", "Month", "Day"). Then, I need to be able to copy all rows that have the same "Element Type" and "Year" to a new file, using the same header from the original spreadsheet on each new spreadsheet - doing this multiple times until the end of the file is reached.

Ideally, the new files would have a strict naming convention: XXXXXX-ZZZZ (YYYY).xls, where the X's are the value of the "COOP Station ID" in Column A, the Z's are the "Element Type" from Column C, and the Y's are the "Year" from Column E. If this theoretical macro were run with the Sample Data file I provided, it should result in the creation of five new workbooks. Is there a way to write a macro to do this, or at least something similar

View 3 Replies View Related

Copy Data From New Everyday Csv File To Next Empty Row In Master File

Dec 15, 2009

I have csv files auto generated (with date stamp in name) and saved in a specific folder everyday. I need to find a macro that will copy the row(s) every day and add to the next empty row in the master excel file. Some days the csv file may have a single row of data and on some other days it may have multiple rows of data to copy and paste.

View 4 Replies View Related

Copy The Same Cells On Different Worksheet On Different File On A Master File

Aug 3, 2006

I have certain excel file that i want to be able to write a macro in order for it to extract certain information from certain cells on different sheet. In other words, i want cell A2 from each of the three different worksheet i have under different files. And have those data automatically update a master excel or access file whichever might be easier.

View 4 Replies View Related

User Input For File & Path For File Copy

Jan 26, 2008

Below is the current code I have for File Copy before the workbook closes. This file will be distributed all over and obviously will not have the same old path and new path locations as I have in my code also will not have the same file name. Is there anyway to still perform the file copy without knowing the old path and file name and possibly have message box pop up to ask the copy to location and use that in the new path string?

Sub Macro1()
Dim fs As Object
Dim oldPath As String, newPath As String
oldPath = "I:EXLDATAMC Daily" '<---Where the file is currently located
newPath = "H:South RegionOrlando Mail Services2008DI" 'Since the super shared drive is super slow we will just copy and replace this file each time before we close and of course after we save
Set fs = CreateObject("Scripting.FileSystemObject")
fs.CopyFile oldPath & "" & "OrlandoMail.xls", newPath & "" & "OrlandoMail.xls"
Set fs = Nothing
End Sub

View 4 Replies View Related

Macros On Server

Nov 5, 2008

I have a spreadsheet which I used in a previous job, which was set up by our old IT Department. Basically, it allows me to save information onto it, which I can then retrieve, (in any conditions/search fields i.e. in a date range etc) but the problem is; when I try to use it on my laptop, I look at the editor used for macros, I can see that the spreadsheet is linked to the servers of my old company. Therefore, I cannot use it myself

I do not know a lot about macros etc. but I can send a copy of the spreadsheet to anybody who is willing to help!

I think it is just a case of changing the macros/strings of where to draw and save information to/from, but I don;t know.

View 10 Replies View Related

Macro To Copy From One File And Paste Under The Last Used Row Of Another File?

Jun 26, 2012

I already have code that I believe is supposed to do what I'm trying to accomplish. However, it doesn't fully work. The Macro is below:

VB:
Workbooks.Open Filename:="C:Documents and Settingsplp138DesktopExample 1.xls"
On Error Resume Next
With Workbooks("Example 2.xls")[code]....

Basically, what I'm trying to accomplish is to have a certain range from one file copied, and pasted in the next available (empty) row of another file. While debugging I see that everything is working except for the actual pasting.

View 3 Replies View Related

Copy File Name And Contents Of That File In A Specified Path?

Feb 5, 2014

I just found a code to copy file path and file contents. However it is copying folder path and folder contents.here is my requirement.I will specify a path, macro has to copy that file name in a particular cell, then it has to copy all its contents.
ex:

file name 1 has 3 sub files in it, file name 2 has 2 sub files in it--

column AColumn B
file name1file contents
file name1file contents
file name1file contents
file name2file contents
file name2file contents

And also i have extend this macro to write a index function. i will tell u about this. but first i need above thing I researched but I didn't find.

I need file name in a column then i need file contents in b column.

if a file has 10 file contents in a file then that file name should come 10 times in a column, and in b column all its contents.

View 14 Replies View Related

Copy File Names From A Directory Into An File

Mar 11, 2007

Is it possible w/ some vba code to copy the names of files, either from a search or a specific directory to an Excel Worksheet?

View 9 Replies View Related

Match & Copy Data From File To File

Aug 23, 2008

Is there an easy way to automatically copy data from 1 Excel spreadsheet to another when the data is slightly out of order? Currently an admin copies and pastes from file 1 to file 2 manually. There are approximately 800 names to copy. It would be ideal to type a command or press a key and have file 2 updated automatically. Is there a feasible way to accomplish this without spending a lot of money or time?

file 1 file 2

john 100 john 100
june 200 lance 50
marie 150 june 75
stan 100 marie 125
phone 50 stan 200
hold 25

In the example above, if lance doesn't appear in file 1 his amount doesn't get copied and his 50 remains the same. The amounts do not get added, just pasted over from file 1 to file 2 with the days sales results. Only the names on file 2 get pasted over. Phone and hold amounts in file 1 are ignored.

View 3 Replies View Related

Retrieve Data From Sql Server

Nov 25, 2008

This code should retrieve data from sql server to excel sheet
filtering according to the "where" statement
its a modified recorded macro.

View 7 Replies View Related

Login To HTTPS Server

May 2, 2013

I am looking to further improve this code by adding the functionality of logging to a secure HTTPS server using username and password.

Code:

Sub TestFileExistsandDownload()
'This code will test a web address to see if a file exists
'If the file exists, it will download the file.
' It's a mixture of code retreived from 2 sites:
' [URL]...
' [URL]....

[Code]...

View 1 Replies View Related

Server Uptime / Downtime Calculation

Apr 29, 2014

We have a number of internal office servers (Active Directory - Exchange - SharePoint "free" etc etc usual stuff) and I need to create an uptime/downtime calculator in excel with the facility to record the information on a daily, monthly and yearly bases but not sure how to go about this.

I would like a way to record on a daily bases what the uptime/downtime has been for each server and then to record the same for that month in a percentage.

For example in a 24hr period for each month of the year:

For that day Active Directory Server was UP for 24hrs. (100% uptime) - (0% downtime)
X by the number of days in the month i.e.
Over the month Active Directory has been UP for. (XX% uptime) - (XX% downtime)

Exchange Server was DOWN for 1hrs. (95.833% uptime) - (x% downtime)
X by the number of days in the month i.e.
Over the month Exchange has been UP for. (XX% uptime) - (XX% downtime)

SharePoint Server was DOWN for 1hrs. (95.833% uptime) - (x% downtime)
X by the number of days in the month i.e.
Over the month SharePoint has been UP for. (XX% uptime) - (XX% downtime)

View 5 Replies View Related

How To Extract Dataset In Excel From SQL Server

Aug 22, 2013

I have a database in sql server i want to make a excel form where in a user will enter the data and print the excel file

E.g.

S.NoDESCRIPTIONPART NO

I want a user to write the item description and data should come directly from database .

View 4 Replies View Related

Populating Cells With SQL Server Data

Jul 29, 2009

I need to run multiple queries and insert their results into Excel cells. Each query will return only one result (a number, or a null). What is the best way to accomplish this?

Below is an example of the code I'm currently using. It does return data to the cell specified, but I'm guessing there's an easier way to populate multiple cells with the results of multiple queries.

View 14 Replies View Related

How To Connect To Unix OS On Solaris Server

May 28, 2012

I am trying to get some data on a excel. This data is available on a unix OS solaris server.

The data is available in tabular format on the txt file in the server and i need to populate this data on my excel sheet.

How to connect to unix from excel and how to get the data.

View 1 Replies View Related

Export Range To JPG And Store To Server

Oct 30, 2012

I have code which is convert some range of excel to Png and store to my local drive. This code is working fine.

I have created web site on my intranet and the data store on server, now i use this code and pickup image from my local storage i.e. from "C" Drive and paste in to service folder, bcoz i uploaded report as a Image and it timely refreshed and changed

Is there any way so this code directly store to service folder, if i can use IP address or HTTP path

I had tried with HTTP path but it is not working.

My server path is [URL] .......
OR

Is there any way when local folder got image than automatically server folder also get same image...

Sub bah()
''' Set Range you want to export to file
Dim rgExp As Range: Set rgExp = Range("B2:C6")
''' Copy range as picture onto Clipboard
rgExp.CopyPicture Appearance:=xlScreen, format:=xlBitmap
''' Create an empty chart with exact size of range copied

[Code] .........

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved