Loading Data into salesforce.com



Similar documents
Microsoft Excel 2010

EXCEL 2007 VLOOKUP FOR BUDGET EXAMPLE

To add a data form to excel - you need to have the insert form table active - to make it active and add it to excel do the following:

Commonly Used Excel Formulas

Using VLOOKUP to Combine Data in Microsoft Excel

Microsoft Excel: Formulas, Formulas...

How To Use Excel With A Calculator

ACS Microcomputer Workshop Excel: Functions and Data Analysis Tools

Lesson 4.3: Using the VLOOKUP Function

MICROSOFT EXCEL FORMULAS

Excel Database Management Microsoft Excel 2003

EXCEL Using Excel for Data Query & Management. Information Technology. MS Office Excel 2007 Users Guide. IT Training & Development

Macros allow you to integrate existing Excel reports with a new information system

Performing Simple Calculations Using the Status Bar

Highline Excel 2016 Class 11: Lookup Formulas & Functions: VLOOKUP & More: Comprehensive Lessons

Creating A Grade Sheet With Microsoft Excel

Monte Carlo Simulation. SMG ITS Advanced Excel Workshop

Sample- for evaluation only. Advanced Excel. TeachUcomp, Inc. A Presentation of TeachUcomp Incorporated. Copyright TeachUcomp, Inc.

Advanced Excel Formulas & Functions

Tommy B. Harrington 104 Azalea Drive Greenville, NC

CGS2531 Problem Solving Using Computer Software Sample Exam 3. Select the most appropriate answer(s).

Microsoft Excel 2007 Critical Data Analysis Using Functions

In This Issue: Excel Sorting with Text and Numbers

Excel for Data Cleaning and Management

How To Use Excel On A Computer Or A Computer With A Cell Phone Or Cell Phone

Excel Intermediate. Table of Contents UPPER, LOWER, PROPER AND TRIM...28

Microsoft Excel 2007 Mini Skills Overview of Tables

Using Excel As A Database

How to Use a Data Spreadsheet: Excel

Task Force on Technology / EXCEL

MS Excel. Handout: Level 2. elearning Department. Copyright 2016 CMS e-learning Department. All Rights Reserved. Page 1 of 11

Page 1 EXPERT. 1.1 Manage Multiple Workbooks Pages Where Covered Modifying existing templates. 356 (Step 7 Tip) Merging multiple workbooks

Getting Started with Excel Table of Contents

To reuse a template that you ve recently used, click Recent Templates, click the template that you want, and then click Create.

Finding the last cell in an Excel range Using built in Excel functions to locate the last cell containing data in a range of cells.

To create a histogram, you must organize the data in two columns on the worksheet. These columns must contain the following data:

EXAMPLE WITH NO NAME EXAMPLE WITH A NAME

Excel 2010: Create your first spreadsheet

VLOOKUP Functions How do I?

Search help. More on Office.com: images templates. Here are some basic tasks that you can do in Microsoft Excel 2010.

Microsoft Excel Tips & Tricks

Microsoft Access Basics

Estimating with Microsoft Excel

SENDING S WITH MAIL MERGE

10 Excel Tips To Make Your Business More Productive

What is Microsoft Excel?

MS Access Lab 2. Topic: Tables

4. The Third Stage In Designing A Database Is When We Analyze Our Tables More Closely And Create A Between Tables

Designed by Jason Wagner, Course Web Programmer, Office of e-learning ZPRELIMINARY INFORMATION... 1 LOADING THE INITIAL REPORT... 1 OUR EXAMPLE...

SOAL-SOAL MICROSOFT EXCEL 1. The box on the chart that contains the name of each individual record is called the. A. cell B. title C. axis D.

How To Create A Report In Excel

1. Linking among several worksheets in the same workbook 2. Linking data from one workbook to another

Introduction to Microsoft Access 2003

MS Excel as a Database

Excel: Further Functions

Excel 2013 Sort: Custom Sorts, Sort Levels, Changing Level & Sorting by Colored Cells

Microsoft Office 2010: Access 2010, Excel 2010, Lync 2010 learning assets

Microsoft Excel 2013: Using a Data Entry Form

Using MS Excel V Lookups

Microsoft Excel 2010 Part 3: Advanced Excel

Migrating to Excel 2010 from Excel Excel - Microsoft Office 1 of 1

Microsoft Excel 2010 Training. Use Excel tables to manage information

Lab 11: Budgeting with Excel

Importing TSM Data into Microsoft Excel using Microsoft Query

Excel 2003 Tutorials - Video File Attributes

Excel IF Statements, LOOKUPS & INDEX/MATCH. When to choose which one?

CJA 20. Automated Billing Program Attorney Training Guide EXCEL BILLING FOR CJA CASES. Page 1

Exam Name: Excel 2010 Exam Type: Microsoft Exam Code: Certification Microsoft Office Specialist (MOS) Total Questions: 26

How to Excel with CUFS Part 2 Excel 2010

Excel 2003: Ringtones Task

You will use these functions a moderate amount, much more so for due diligence and analysis of order/customer/other data than in financial models.

Microsoft Access 2010 Part 1: Introduction to Access

Creating Excel Link reports with efficient design

Introduction to Microsoft Access 2010

Instructions for Creating an Outlook Distribution List from an Excel File

EXCEL PIVOT TABLE David Geffen School of Medicine, UCLA Dean s Office Oct 2002

Basics Series-4004 Database Manager and Import Version 9.0

EzyScript User Manual

Coding & Data Skills for Communicators Dr. Cindy Royal Texas State University - San Marcos School of Journalism and Mass Communication

Introduction to Microsoft Access 2013

Excel 2010 Level 2. Computer Training Centre, UCC, /3751/3752

Excel Reporting with 1010data

Excel & Visual Basic for Applications (VBA)

EXCEL VBA ( MACRO PROGRAMMING ) LEVEL SEPTEMBER AM-5.00PM MENARA PJ@AMCORP PETALING JAYA

Microsoft Office Access 2007 Basics

ODBC Reference Guide

Intellect Platform - Tables and Templates Basic Document Management System - A101

USC Marshall School of Business Marshall Information Services

Data Management for Multi-Environment Trials in Excel

How To Understand The Basic Concepts Of A Database And Data Science

Computer Skills: Levels of Proficiency

Some Useful Functions in Microsoft Excel 2003

RA MODEL VISUALIZATION WITH MICROSOFT EXCEL 2013 AND GEPHI

Advanced Microsoft Excel 2013

Excel Working with Data Lists

Search help. More on Office.com: images templates

Excel 2007: Basics Learning Guide

Excel 2010 Sorting and Filtering

Word 2010: Mail Merge to with Attachments

NEXT-ANALYTICS lets you specify more than one profile View in a single query.

Transcription:

Overview Data can be uploaded into salesforce.com from Excel using the sforce connector, an open source plugin for excel, available here: http://sforce.sourceforge.net/excel/downloads.htm This plug-in s functionality is accessible from a drop down menu via the Excel GUI, as well as from the VB editor in Excel. Note that salesforce.com support has not been trained on assisting with this process. As with any database data load, there may be dependencies in place, such as parent-child relationships, on the objects into which data is to be loaded. There are in general 3 levels of complexity for data loads in salesforce.com: Case I. No dependency loads, for example: Loading leads Loading accounts & contacts Loading independent custom objects Case II. Simple dependency loads, for example Loading tasks related to objects Loading opportunities related to accounts and contacts Loading cases related to accounts and contacts Loading product line items related to products and opportunities Figure 1: The sforce connector Excel toolbar menu Case III. Complex dependency loads, for example Loading pricebooks In Case I, data can be loaded using either the built-in import tools, the Bulk Data Loader, or the sforce connector using the standard data insert functionality: load the file with the values to be inserted, and run the import/insert function. There are no data dependencies, so the data can be completely loaded in one go, with no other references to data necessary. In Case II, the records to be inserted are related to other data in the system (e.g.: opportunities have a relationship with contacts and accounts). These relationships are tracked in salesforce.com, not by putting the name of the parent object (the account) on the child object (the opportunity), but instead, by putting the record ID of the parent object on the child object. Here is an example, from data placed in an excel spreadsheet by an sforce connector query. Notice how the accountid value has nothing to do with a name of an account: Figure 2: Relationships to other objects are represented by the object ID, not the object name 1/6

This fact is what makes the 2 nd case of imports a bit more complex. If we want to upload child data into salesforce.com, and at the same time define the parent ID for each opportunity, then we have to: 1. lookup the parent ID based on the parent object name, 2. feed this parent ID value into the parent ID column in the Excel spreadsheet, 3. upload the child data In Case III, data must be loaded into certain tables before others. In the case of Pricebooks, there are 3 tables that, together, make up the data viewable in each pricebook. These tables are: 1. Product2 2. Pricebook2 3. PricebookEntry In this case, the tables product2 and pricebook2 need to be populated, before PricebookEntry can be populated (see below). Figure 3: The PricebookEntry table. Notice how each entry requires a PricebookID and ProductID 2/6

How to Manually Load Data Excel has a function that can help us with this process: VLOOKUP. See the Appendix for a help on the VLOOKUP function. VLOOKUP and the sforce connector can be used together to populate the complete set of child data to upload: the existing child record data, plus the parent ID field. This process requires 2 excel worksheets. 1. Parent names and IDs: using the sforce connector, query the table with the parent records into one worksheet in a workbook. NOTE: The rows in this list need to be alphabetized by the parent ID values. This is required in order for the VLOOKUP function to work correctly Figure 4: parent object reference data can be in one worksheet, with the child data to be completed in another worksheet 2. Child data: after switching to a new worksheet, using the sforce connector, load the child record data into a second worksheet, with Parent record names in one column, and a blank column for the parent record IDs, which we will fill using the VLOOKUP function (See below). At this time, paste any new record data into this sheet, matching the worksheet columns with the data columns Once this VLOOKUP has been used to completely populate the parent object ID data column on the Child data worksheet, then the child data can be uploaded into salesforce.com: using the sforce connector, 1. Enter New in the child record ID column, 2. Highlight the rows to upload, 3. Select the insert selected rows menu option of the sforce connector. 4. The data will be uploaded, and the relationships with the parent data will be defined. Figure 5: the VLOOKUP function in action: the account ID for "Dickenson" is found by looking up the account name from cell F3, in the reference tables on the Account Names and IDs worksheet. 3/6

Note: The format of the VLOOKUP function is: VLOOKUP(lookup_value,table_array,col_index_num,range_lookup) The 4 th parameter, the range_lookup, while optional, needs to be FALSE for the most accurate pattern matching. See the Appendix for more information on the VLOOKUP function. How to Enhance the Process The process defined above works very well, and is good for technical users. However, if this will be a frequently used process, performed by non-technical people, the user interface could be made much simpler, and much more user friendly. With a little bit of Visual Basic, a nice GUI front end can be tacked on to the front of this workbook to make it a very useful tool. The various functions used by the sforce connector are accessible from any VB code you would write (just add sforce-connector as a reference to your Excel VB project). Depending on the application, you may need to develop any of the following screens: 1. A Login Screen, so the user s salesforce.com login can be captured 2. An upload option screen, where the user is asked what type of data to upload. Behind the scenes, based on the selection, the appropriate salesforce.com tables will be queried for reference data, and a screen will be presented to the user where they can paste in the data to upload. 3. A parent object selection screen, if the upload will be assigning a series of data records to a single parent 4. Any others you may need 4/6

Appendix A: VLOOKUP Loading Data into salesforce.com (copied for reference from MS Excel Help) Searches for a value in the leftmost column of a table, and then returns a value in the same row from a column you specify in the table. Use VLOOKUP instead of HLOOKUP when your comparison values are located in a column to the left of the data you want to find. The V in VLOOKUP stands for "Vertical." Syntax VLOOKUP(lookup_value,table_array,col_index_num,range_lookup) Lookup_value is the value to be found in the first column of the array. Lookup_value can be a value, a reference, or a text string. Table_array is the table of information in which data is looked up. Use a reference to a range or a range name, such as Database or List. If range_lookup is TRUE, the values in the first column of table_array must be placed in ascending order:..., -2, -1, 0, 1, 2,..., A-Z, FALSE, TRUE; otherwise VLOOKUP may not give the correct value. If range_lookup is FALSE, table_array does not need to be sorted. You can put the values in ascending order by choosing the Sort command from the Data menu and selecting Ascending. The values in the first column of table_array can be text, numbers, or logical values. Uppercase and lowercase text are equivalent. Col_index_num is the column number in table_array from which the matching value must be returned. A col_index_num of 1 returns the value in the first column in table_array; a col_index_num of 2 returns the value in the second column in table_array, and so on. If col_index_num is less than 1, VLOOKUP returns the #VALUE! error value; if col_index_num is greater than the number of columns in table_array, VLOOKUP returns the #REF! error value. Range_lookup is a logical value that specifies whether you want VLOOKUP to find an exact match or an approximate match. If TRUE or omitted, an approximate match is returned. In other words, if an exact match is not found, the next largest value that is less than lookup_value is returned. If FALSE, VLOOKUP will find an exact match. If one is not found, the error value #N/A is returned. Remarks If VLOOKUP can't find lookup_value, and range_lookup is TRUE, it uses the largest value that is less than or equal to lookup_value. If lookup_value is smaller than the smallest value in the first column of table_array, VLOOKUP returns the #N/A error value. If VLOOKUP can't find lookup_value, and range_lookup is FALSE, VLOOKUP returns the #N/A value. 5/6

Example The example may be easier to understand if you copy it to a blank worksheet. 1. Create a blank workbook or worksheet. 2. Select the example in the Help topic. Do not select the row or column headers Selecting an example from Help 3. Press CTRL+C. 4. In the worksheet, select cell A1, and press CTRL+V. 5. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Tools menu, point to Formula Auditing, and then click Formula Auditing Mode. The example uses values for air at 1 atm pressure. 1 2 3 4 5 6 7 8 9 10 Formula =VLOOKUP(1,A2:C10,2) A B C Density Viscosity Temperature 0.457 3.55 500 0.525 3.25 400 0.616 2.93 300 0.675 2.75 250 0.746 2.57 200 0.835 2.38 150 0.946 2.17 100 1.09 1.95 50 1.29 1.71 0 Description (Result) Looks up 1 in column A, and returns the value from column B in the same row (2.17) Looks up 1 in column A, and returns the value from column C =VLOOKUP(1,A2:C10,3,TRUE) in the same row (100) Looks up 0.746 in column A. Because there is no exact match =VLOOKUP(.7,A2:C10,3,FALSE) in column A, an error is returned (#N/A) Looks up 0.1 in column A. Because 0.1 is less than the =VLOOKUP(0.1,A2:C10,2,TRUE) smallest value in column A, an error is returned (#N/A) =VLOOKUP(2,A2:C10,2,TRUE) Looks up 2 in column A, and returns the value from column B in the same row (1.71) 6/6