Chapter 3: PowerPivot: In-Depth 87
To copy and paste, you need to be looking at an existing PowerPivot table with the
focus within the table. Press ctrl-a to select the whole table, then click Copy in the
Clipboard group of the Home ribbon. Open a text editor, such as Notepad, and paste in
your data. Save and close the new text file. You can now use this as the import file for
PowerPivot. Depending upon your text editor, you might have to change the Column
Separator from Comma (,) to Tab (t).
To create a text file using SSIS, you need a new Integration Services Project in BIDS.
Add a Data Flow Task to the Control Flow and then go to the Data Flow tab. Add a
suitable source, such as OLE DB Source or Excel Source, and point it to your source
data for the new text file—for example, you could use the Customers table in either
a SQL Server or Access Northwind database. Add a Flat File Destination and drag
the green data pipeline from the source to the destination. Double-click the Flat File
Destination to configure it. You’ll need a new Flat File connection manager. It’s easier
if you accept Delimited as the text file format; you’ll also need to specify a file name for
the new text file and decide whether the first row is going to contain column headers.
When you’ve finished configuring your SSIS package, execute it to create a new text
file. Then, you can use this as a data import source for PowerPivot.
From Other Sources
We are at the penultimate button in the Get External Data group of the PowerPivot
Home ribbon. The From Other Sources button offers you a list of possible data sources
for your PowerPivot tables. The list includes all of the options discussed earlier, even
though the captions may be slightly different (Microsoft SQL Server, for example, is
the same as SQL Server). The list is shown in Figure 3-23 and in Figure 3-24. Here
we’ll take a brief look at only those ones that are new—so Microsoft SQL Server and
a couple of others won’t be covered again. The list of import options is divided into
sections. In the Relational Databases section (Figure 3-23) are Microsoft SQL Server,
Microsoft SQL Azure, Microsoft SQL Server Parallel Data Warehouse, Microsoft
Access, Oracle, Teradata, Sybase, Informix, IBM DB2, and Others (OLEDB/ODBC).
In general, apart from the last one, they require a server name and login credentials.
In addition, some require a database name. The last one, Others (OLEDB/ODBC),
requires that you write your own connection string, if you don’t have an existing DSN
(data source name) file. PowerPivot will try, and often succeed, to display a list of tables
from the connection—if it does, you can also write T-SQL queries against the source.
Alternatively, you can write your own queries, using the default query language of the
source. You may or may not have all of these data sources—it’s a very comprehensive
list! In addition, you may or may not have the necessary data providers required to
connect to these sources. A couple of these data sources might be new to you. For
example, SQL Azure is the great big SQL Server in the sky—it’s a relational data