This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void importInventory() | |
{ | |
//get contents of the remote CSV file | |
csv = getUrl("http://yourserver.com/ftp.php"); | |
//create a list and add each row of the csv file into a new list item | |
line_list = csv.toList("\n"); | |
//empty Products table if today's csv has data. | |
if (line_list.size() > 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void importInventory() | |
{ | |
//get contents of the remote CSV file | |
csv = getUrl("http://yourserver.com/ftp.php"); | |
//show raw data for debugging purposes | |
info csv; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Product ID | Product | Quantity | Unit Price | Last Updated | |
---|---|---|---|---|---|
123 | Some Product 1 | 12 | 4.99 | 15-04-13 | |
124 | Some Product 2 | 22 | 18 | 15-04-14 | |
125 | Some Product 3 | 7 | 23.5 | 15-04-15 | |
126 | Some Product 4 | 655 | 2.75 | 15-04-16 | |
127 | Some Product 5 | 0 | 19 | 15-04-17 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//ftp server information | |
//change values to reflect you server settings | |
$ftp_server = "ftp.yoursite.com"; | |
$ftp_username = "username"; | |
$ftp_password = "password"; | |
$server_file = "/path_to_csv_file/inventory.csv"; | |
$local_file = "inventory.csv"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alert = function(s) { WScript.Echo(s) } | |
var fso, | |
folder, | |
wordDoc, | |
wordApp, | |
extension = 'DOT', | |
fileFormat = 1, //see http://msdn.microsoft.com/en-us/library/office/ff839952.aspx | |
sourcePath = "\\SOURCE\\PATH\\" + extension + "\\", | |
destPath = "\\DESTINATION\\PATH\\"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Function getURL(rng As Range) As String | |
If rng(1).Hyperlinks.Count Then getURL = rng.Hyperlinks(1).Address | |
End Function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub batch_rename() | |
On Error GoTo errHndl | |
Dim fso As New FileSystemObject | |
Dim fld As Folder | |
Dim sourcePath As String, destPath As String | |
Dim sourceFile As String, destFile As String, sourceExtension As String | |
Dim rng As Range, cell As Range, row As Range | |
sourcePath = "\path to old files\" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'set paths | |
sourcePath = "\\source\" | |
destPath = "\\dest\" | |
'initiate the file system object | |
set fso = CreateObject("Scripting.FileSystemObject") | |
if fso.FolderExists(sourcePath) then | |
'first get all the sub-folder | |
set folder = fso.GetFolder(sourcePath) |