<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Importing a SAS Dataset  directly into an EXCEL Pivot table in Microsoft Integration with SAS</title>
    <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Importing-a-SAS-Dataset-directly-into-an-EXCEL-Pivot-table/m-p/32288#M579</link>
    <description>You can open ("external") data directly into a PivotTable without copying it to Excel.  Any data that is accessible via ODBC or an OLEDB data provider (which includes SAS) can be opened into a PivotTable in Excel.  Unfortunately, the Excel 2003 UI only lets you select ODBC data sources.  You'll have to write VBA code to open a PivotTable in Excel 2003 using an OLEDB provider.  The Excel 2007 UI lets you select ODBC or OLEDB providers.  &lt;BR /&gt;
&lt;BR /&gt;
For OLEDB, use the SAS IOM Data Provider if the data is on a SAS server; use the SAS Local Data Provider if data is on the local machine or accessed via UNC path.  If you need help with the SAS data providers, see the SAS OLEDB Data Providers Cookbook in the OnlineDocs.&lt;BR /&gt;
&lt;BR /&gt;
Note: The SAS Add-In for Microsoft Office handles all this for you -- just select your data and it opens it in the PivotTable.</description>
    <pubDate>Mon, 07 Jun 2010 14:39:36 GMT</pubDate>
    <dc:creator>CaseySmith</dc:creator>
    <dc:date>2010-06-07T14:39:36Z</dc:date>
    <item>
      <title>Importing a SAS Dataset  directly into an EXCEL Pivot table</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Importing-a-SAS-Dataset-directly-into-an-EXCEL-Pivot-table/m-p/32287#M578</link>
      <description>Hi All,&lt;BR /&gt;
I plan to dice and slice my datasets with different groupings in an Excel Pivot table. I have a huge SAS Dataset (64K + rows) that cannot be copied into Excel and then create a pivot table out of it.&lt;BR /&gt;
&lt;BR /&gt;
For this very reason of overcoming the 64K rows limitation, I need to somehow import the SAS Dataset directly into a pivot table.&lt;BR /&gt;
&lt;BR /&gt;
Can you please suggest me a way if there is any ?&lt;BR /&gt;
&lt;BR /&gt;
Thank you</description>
      <pubDate>Mon, 07 Jun 2010 13:48:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Importing-a-SAS-Dataset-directly-into-an-EXCEL-Pivot-table/m-p/32287#M578</guid>
      <dc:creator>SMS</dc:creator>
      <dc:date>2010-06-07T13:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: Importing a SAS Dataset  directly into an EXCEL Pivot table</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Importing-a-SAS-Dataset-directly-into-an-EXCEL-Pivot-table/m-p/32288#M579</link>
      <description>You can open ("external") data directly into a PivotTable without copying it to Excel.  Any data that is accessible via ODBC or an OLEDB data provider (which includes SAS) can be opened into a PivotTable in Excel.  Unfortunately, the Excel 2003 UI only lets you select ODBC data sources.  You'll have to write VBA code to open a PivotTable in Excel 2003 using an OLEDB provider.  The Excel 2007 UI lets you select ODBC or OLEDB providers.  &lt;BR /&gt;
&lt;BR /&gt;
For OLEDB, use the SAS IOM Data Provider if the data is on a SAS server; use the SAS Local Data Provider if data is on the local machine or accessed via UNC path.  If you need help with the SAS data providers, see the SAS OLEDB Data Providers Cookbook in the OnlineDocs.&lt;BR /&gt;
&lt;BR /&gt;
Note: The SAS Add-In for Microsoft Office handles all this for you -- just select your data and it opens it in the PivotTable.</description>
      <pubDate>Mon, 07 Jun 2010 14:39:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Importing-a-SAS-Dataset-directly-into-an-EXCEL-Pivot-table/m-p/32288#M579</guid>
      <dc:creator>CaseySmith</dc:creator>
      <dc:date>2010-06-07T14:39:36Z</dc:date>
    </item>
    <item>
      <title>Re: Importing a SAS Dataset  directly into an EXCEL Pivot table</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Importing-a-SAS-Dataset-directly-into-an-EXCEL-Pivot-table/m-p/32289#M580</link>
      <description>Thank you Casey for the reply.&lt;BR /&gt;
&lt;BR /&gt;
I am not very proficient at VBA, so i will see if any other forum member (SAS expert) has written anything similar.&lt;BR /&gt;
&lt;BR /&gt;
As for the SAS Add in , is it a part of a certain package ? Does any detail in my license info tell me if my company has it ?&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Mon, 07 Jun 2010 14:50:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Importing-a-SAS-Dataset-directly-into-an-EXCEL-Pivot-table/m-p/32289#M580</guid>
      <dc:creator>SMS</dc:creator>
      <dc:date>2010-06-07T14:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: Importing a SAS Dataset  directly into an EXCEL Pivot table</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Importing-a-SAS-Dataset-directly-into-an-EXCEL-Pivot-table/m-p/32290#M581</link>
      <description>I know next to nothing about excel, but ...&lt;BR /&gt;
&lt;BR /&gt;
Doesn't a pivot table need all of the raw data to operate its slicing and dicing routines?  If so, the 64k limit remains (unless you have the SAS Addin).</description>
      <pubDate>Mon, 07 Jun 2010 14:58:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Importing-a-SAS-Dataset-directly-into-an-EXCEL-Pivot-table/m-p/32290#M581</guid>
      <dc:creator>Bill</dc:creator>
      <dc:date>2010-06-07T14:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: Importing a SAS Dataset  directly into an EXCEL Pivot table</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Importing-a-SAS-Dataset-directly-into-an-EXCEL-Pivot-table/m-p/32291#M582</link>
      <description>Yes, Excel pulls the data to the client to do its aggregations for the PivotTable.  I also wondered whether the 64k limit would still remain, so I tried it out.  I opened a 1 million observation SAS data set into an Excel 2003 PivotTable without a problem (using Excel only -- no SAS Addin).  So, it is evidently in memory, and avoids the 64k limit.&lt;BR /&gt;
&lt;BR /&gt;
Of course, the Excel PivotTable performance is proportional to the size of the relational data.  If performance becomes an issue, switching to an OLAP cube (which is pre-aggregated) avoids having Excel pull all the data and performing the aggregations.&lt;BR /&gt;
&lt;BR /&gt;
The SAS Add-In for Microsoft Office is usually in a BI bundle.</description>
      <pubDate>Mon, 07 Jun 2010 15:20:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Importing-a-SAS-Dataset-directly-into-an-EXCEL-Pivot-table/m-p/32291#M582</guid>
      <dc:creator>CaseySmith</dc:creator>
      <dc:date>2010-06-07T15:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: Importing a SAS Dataset  directly into an EXCEL Pivot table</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Importing-a-SAS-Dataset-directly-into-an-EXCEL-Pivot-table/m-p/32292#M583</link>
      <description>Here is a sample VBA macro that creates an Excel PivotTable using a SAS cube, server data set, or local data set.  It requires the SAS OLEDB data providers.  And of course, you'd need to update the connection strings for your environment.&lt;BR /&gt;
&lt;BR /&gt;
Sub CreatePivotTable()&lt;BR /&gt;
&lt;BR /&gt;
    Dim pc As PivotCache&lt;BR /&gt;
    Dim pt As PivotTable&lt;BR /&gt;
    Dim connectionString As String&lt;BR /&gt;
    Dim commandType As XlCmdType&lt;BR /&gt;
    Dim commandText As String&lt;BR /&gt;
    Dim version As XlPivotTableVersionList&lt;BR /&gt;
        &lt;BR /&gt;
    'Change these values to customize your PivotTable&lt;BR /&gt;
    Const dataType As Integer = 1           'Use OLAP cube (0), server data set (1), or local data set (2)&lt;BR /&gt;
    version = xlPivotTableVersion10         'Version of the PivotTable to create&lt;BR /&gt;
    &lt;BR /&gt;
    'Add a PivotCache (for Excel2007 PivotTables, use the new Create method instead of Add&lt;BR /&gt;
    If version = xlPivotTableVersion12 Then&lt;BR /&gt;
        Set pc = ActiveWorkbook.PivotCaches.Create(xlExternal)&lt;BR /&gt;
    Else&lt;BR /&gt;
        Set pc = ActiveWorkbook.PivotCaches.Add(xlExternal)&lt;BR /&gt;
    End If&lt;BR /&gt;
        &lt;BR /&gt;
    If dataType = 0 Then        'OLAP&lt;BR /&gt;
        connectionString = "OLEDB;Provider=SAS OLAP Data Provider 9.2;User ID=olaptst1;Password=*****;Data Source=bciba09;Location=bciba09;SAS Machine DNS Name=bciba09;SAS Port=5451;SAS Protocol=2;SAS Server Type=2;"&lt;BR /&gt;
        commandType = xlCmdCube&lt;BR /&gt;
        commandText = "PRDMDDB"             'The name of the cube to open&lt;BR /&gt;
    ElseIf dataType = 1 Then    'server relational&lt;BR /&gt;
        connectionString = "OLEDB;Provider=SAS.IOMProvider; User ID=sasdemo; Password=****; SAS Machine DNS Name=d14217.na.sas.com; SAS Protocol=2; SAS Port=8591;"&lt;BR /&gt;
        commandType = xlCmdTable&lt;BR /&gt;
        commandText = "SASHELP.CLASS"       'The name of the IOM dataset to open&lt;BR /&gt;
    Else&lt;BR /&gt;
        connectionString = "OLEDB;Provider=sas.LocalProvider.9.2;Data Source=c:\program files\sas\enterpriseguide\4.3\sample\data;Mode=Read|Share Deny None"&lt;BR /&gt;
        commandType = xlCmdTable&lt;BR /&gt;
        commandText = "class"               'The name of the local dataset to open&lt;BR /&gt;
    End If&lt;BR /&gt;
    &lt;BR /&gt;
    pc.Connection = connectionString        'OLEDB connection string to the server&lt;BR /&gt;
    pc.commandType = commandType&lt;BR /&gt;
    pc.commandText = commandText&lt;BR /&gt;
    Set pt = pc.CreatePivotTable(TableDestination:=ActiveCell, DefaultVersion:=version)&lt;BR /&gt;
    &lt;BR /&gt;
End Sub</description>
      <pubDate>Mon, 07 Jun 2010 15:55:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Importing-a-SAS-Dataset-directly-into-an-EXCEL-Pivot-table/m-p/32292#M583</guid>
      <dc:creator>CaseySmith</dc:creator>
      <dc:date>2010-06-07T15:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: Importing a SAS Dataset  directly into an EXCEL Pivot table</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Importing-a-SAS-Dataset-directly-into-an-EXCEL-Pivot-table/m-p/32293#M584</link>
      <description>Another option that is relatively easy compared to writing VBA code is to export the SAS data to an Access database then use the Access table as a source for the pivot table. I have Access databases that have hundreds of thousands of rows that work really well as sources for pivot tables.</description>
      <pubDate>Fri, 13 Aug 2010 13:03:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Importing-a-SAS-Dataset-directly-into-an-EXCEL-Pivot-table/m-p/32293#M584</guid>
      <dc:creator>FloydNevseta</dc:creator>
      <dc:date>2010-08-13T13:03:53Z</dc:date>
    </item>
  </channel>
</rss>

