** 7.5 has brought an updated method to accomplish this. For more information, go to this help doc: http://community.spiceworks.com/help/Import_Inv<\/a> **<\/p>\n
We’ve heard from users who have an inventory of their old systems in an Excel file or even another system. With this script you’ll now be able to import devices into Spiceworks from a csv file.<\/p>\n
Be sure to backup your database before you start!!<\/p>\n You’ll need a CSV file with the data you’d like to import. For the first run start with 2-3 entries (so you can test it!). The first line of the file needs to be the name of the columns. An example CSV file is:<\/p>\n Navigate to Settings → Backup Configuration and click “Back up Now”.<\/p>\n<\/div>\n Using Windows Explorer navigate to C:\\Program Files (x86)\\Spiceworks\\pkg\\gems (replace “C:\\Program Files (x86)” with the location where Spiceworks is installed)<\/p>\n Browse into the directory spiceworks-x.x.xxxx (choose the latest version you see listed. For eg: at the time I’m writing this how-to the latest version is spiceworks-7.4.00059)<\/p>\n You’ll see a file bulk_import.rb in this directory. Copy this file to C:\\Program Files\\Spiceworks\\bin (again replace Program Files with the location of your install)<\/p>\n<\/div>\n Your CSV file is pretty straightforward - the first row should be the column headers (like Name,Manufacturer,Device Type,Model…), and then each subsequent row in the CSV represents a single device.<\/p>\n Check the end of the import script to see which headers are accepted “out of the box” (by default). You can read the import script using any text editor.<\/p>\n If you need more than the defaults you can also add your own custom headers. For any non-default header in your CSV, login to Spiceworks and go to Settings > Advanced & International Options. Under Custom Attributes, add a new attribute for each non-default header. Then, in the CSV add a “C” to the beginning of the header.<\/p>\n Example: Open a command prompt window and navigate to the C:\\Program Files (x86)\\Spiceworks\\bin directory (replacing Program Files (x86) with the right location)<\/p>\n<\/div>\n The usage of the script is as follows: Usage: bulk_import.rb [options] - creates assets in Spiceworks from a CSV file<\/p>\n Options: For eg: If you have Spiceworks running on port 9675 and the computer spiceserver with login [email protected]<\/a> and your csv file is assetlist.csv your command line will look like:<\/p>\n
\n<\/a>Name,Manufacturer,Device Type,Model,IP Address,Serial Number,Location,Operating System
\ncopier1,Apple,Copier,“”,192.168.168.115,“”,Austin,“”
\nfax1,Acme,Fax,Latitude D830,“”,45322221,Round Rock,Fax Plus Bios
\nfax2,Acme,Fax,Latitude D830,“”,45322222,Cedar Park,Fax Plus Bios
\nfax3,Acme,Fax,Latitude D830,“”,45322223,Round Rock,Fax Plus Bios<\/h2>\n<\/a>Step 1: Backup Your Spiceworks Database<\/h3>\n
<\/p>\n
<\/a>Step 2: Copy The Import Script<\/h3>\n
<\/p>\n
<\/a>Step 3: Prepare your CSV file<\/h3>\n
\nName,Manufacturer,Device Type,Model,C Closet Name,C Last Service Date,C Leased<\/p>\n<\/div>\n<\/a>Step 4: Open Command Prompt<\/h3>\n
<\/p>\n
<\/a>Step 5: Run The Bulk Import Script<\/h3>\n
<\/p>\n
\nC:\\Program Files\\Spiceworks\\bin>ruby bulk_import.rb -h<\/p>\n
\n-e, --email [EMAIL] email address to log into Spiceworks<\/p>\n-p, --password [PASS] password for email address\n\n-s, --server [SERVER] Spiceworks server to import assets to - default 'localhost'\n\n-P, --port [PORT] the Spiceworks server port - default '80'\n\n-m, --[no-]manual manually created attribute flag - default 'true'\n\n-?, --help show this message\n\n-V, --[no-]verbose flag to enable/disable verbose output\n\n-v, --version show version\n\n-u, --import over a secure https connection; defaults to port 443\n<\/code><\/pre>\n