<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Create Pivottable-reports with VB.NET</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2005/06/28/create-pivottable-reports-with-vbnet/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2005/06/28/create-pivottable-reports-with-vbnet/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Thu, 09 Feb 2012 23:42:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: sandeep</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/06/28/create-pivottable-reports-with-vbnet/#comment-62780</link>
		<dc:creator>sandeep</dc:creator>
		<pubDate>Fri, 29 Apr 2011 09:36:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1177#comment-62780</guid>
		<description>&lt;p&gt;hi, &lt;/p&gt;
&lt;p&gt;i am using vb.net. and i am creating pivot table programatically and i want to add calculation field &quot;perentofcolumn&quot; in that .&lt;br&gt;
when i added this in program. i got an error message (&quot;unable to set the function property of the pivot field class&quot;)&lt;/p&gt;
&lt;p&gt;if anybody please send me the solution for the same..&lt;/p&gt;
&lt;p&gt;thanks ..&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>hi, </p>
<p>i am using vb.net. and i am creating pivot table programatically and i want to add calculation field &#8220;perentofcolumn&#8221; in that .<br />
when i added this in program. i got an error message (&#8220;unable to set the function property of the pivot field class&#8221;)</p>
<p>if anybody please send me the solution for the same..</p>
<p>thanks ..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GIRI</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/06/28/create-pivottable-reports-with-vbnet/#comment-59867</link>
		<dc:creator>GIRI</dc:creator>
		<pubDate>Fri, 25 Feb 2011 23:02:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1177#comment-59867</guid>
		<description>&lt;p&gt;Hi ,&lt;/p&gt;
&lt;p&gt;  Hi i have developed in similar manner ....&lt;/p&gt;
&lt;p&gt;  but place stSQL = &quot;EXEC Storedprocedure&quot;&lt;/p&gt;
&lt;p&gt;  AT the Pivottable add point my debugcursor in vanising .....I am not able to find out the cause....but when place the output of the storedprocedure in to some table and written stSQL =&quot;Select * from tbl&quot; it is executing............&lt;/p&gt;
&lt;p&gt;  Please let me know wats happening&lt;/p&gt;
&lt;p&gt;   Thaks lot...&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi ,</p>
<p>  Hi i have developed in similar manner &#8230;.</p>
<p>  but place stSQL = &#8220;EXEC Storedprocedure&#8221;</p>
<p>  AT the Pivottable add point my debugcursor in vanising &#8230;..I am not able to find out the cause&#8230;.but when place the output of the storedprocedure in to some table and written stSQL =&#8221;Select * from tbl&#8221; it is executing&#8230;&#8230;&#8230;&#8230;</p>
<p>  Please let me know wats happening</p>
<p>   Thaks lot&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Juliana Jimenez</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/06/28/create-pivottable-reports-with-vbnet/#comment-55777</link>
		<dc:creator>Juliana Jimenez</dc:creator>
		<pubDate>Mon, 13 Dec 2010 20:08:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1177#comment-55777</guid>
		<description>&lt;p&gt;Ayuda porfavor:&lt;br&gt;
recibi el siguiente error al ejecutar el codigo de ejemplo para la tabla pivote&lt;/p&gt;
&lt;p&gt;No se puede convertir el objeto COM del tipo &#039;System.__ComObject&#039; al tipo de interfaz &#039;Microsoft.Office.Interop.Excel.Application&#039;. Ocurrió un error de operación debido a que la llamada QueryInterface en el componente COM para la interfaz con IID &#039;{000208D5-0000-0000-C000-000000000046}&#039; generó el siguiente error: Biblioteca no registrada. (Excepción de HRESULT: 0×8002801D (TYPE_E_LIBNOTREGISTERED)).&lt;/p&gt;
&lt;p&gt;el siguiente es el codigo de mi objeto:&lt;/p&gt;
&lt;p&gt; Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click&lt;br&gt;
        Const conectabd As String = &quot;data source = (local); initial catalog = Northwind; user id = sa; password = Administrador01?&lt;/p&gt;
&lt;p&gt;        Const consulta As String = &quot;SELECT * FROM Categories&quot;&lt;/p&gt;
&lt;p&gt;        &#039;Dim AppExcel As Excel.Application&lt;br&gt;
        Dim AppExcel As Excel.Application&lt;br&gt;
        Try&lt;br&gt;
            &#039;Grab a running instance of Excel.&lt;br&gt;
ERROR1 ---&gt; AppExcel = Marshal.GetActiveObject(&quot;Excel.Application&quot;)&gt; en esta linea me marca error y si lo cambio por la siguiente linea  Me marca el mismo error ern la linea q tiene la etiqueta ERROR2&lt;br&gt;
            &#039;    AppExcel = New Excel.Application&lt;br&gt;
        Catch ex As COMException&lt;br&gt;
            &#039;If no instance exist then create a new one.&lt;br&gt;
            AppExcel = New Excel.Application&lt;br&gt;
            MessageBox.Show(&quot;ese creo una nueva instancia por que no existia &quot; &amp; ex.Message)&lt;br&gt;
        End Try&lt;/p&gt;
&lt;p&gt;ERROR2 ---&gt; Dim libro As Excel.Workbook = AppExcel.Workbooks.Add(Excel.XlWBATemplate.xlWBATWorksheet)&lt;/p&gt;
&lt;p&gt;        Dim hoja As Excel.Worksheet = DirectCast(libro.Worksheets(1), Excel.Worksheet)&lt;br&gt;
        Dim rango As Excel.Range = DirectCast(hoja, Excel.Worksheet).Range(&quot;B2?)&lt;/p&gt;
&lt;p&gt;        &#039;Create the Pivotcache.&lt;br&gt;
        Dim ptCache As Excel.PivotCache = libro.PivotCaches.Add(SourceType:=Excel.XlPivotTableSourceType.xlExternal)&lt;/p&gt;
&lt;p&gt;        &#039;Setup the Pivotcache.&lt;br&gt;
        With ptCache&lt;br&gt;
            .Connection = conectabd&lt;br&gt;
            .CommandText = consulta&lt;br&gt;
            .CommandType = Excel.XlCmdType.xlCmdSql&lt;br&gt;
        End With&lt;/p&gt;
&lt;p&gt;        &#039;Create the Pivottable.&lt;br&gt;
        Dim ptTable As Excel.PivotTable = _&lt;br&gt;
        hoja.PivotTables.Add( _&lt;br&gt;
        PivotCache:=ptCache, _&lt;br&gt;
        TableDestination:=rango, _&lt;br&gt;
        TableName:=&quot;Tablapivotegenerada&quot;)&lt;/p&gt;
&lt;p&gt;        &#039;Setup the Pivottable.&lt;br&gt;
        With ptTable&lt;br&gt;
            .ManualUpdate = True&lt;br&gt;
            .PivotFields(&quot;ShipCountry&quot;).Orientation = Excel.XlPivotFieldOrientation.xlRowField&lt;br&gt;
            .PivotFields(&quot;# Of Shipments&quot;).Orientation = Excel.XlPivotFieldOrientation.xlDataField&lt;br&gt;
            .PivotFields(&quot;Total Freight&quot;).Orientation = Excel.XlPivotFieldOrientation.xlDataField&lt;br&gt;
            .Format(Excel.XlPivotFormatType.xlReport2)&lt;br&gt;
            .ManualUpdate = False&lt;br&gt;
        End With&lt;/p&gt;
&lt;p&gt;        libro.SaveAs(&quot;c:EXCELReportEGENERADO.xls&quot;)&lt;/p&gt;
&lt;p&gt;        &#039;Switch to Excel.&lt;br&gt;
        With AppExcel&lt;br&gt;
            .Visible = True&lt;br&gt;
            .UserControl = True&lt;br&gt;
        End With&lt;/p&gt;
&lt;p&gt;        &#039;Tell the Garbage Collector that these objects are ready to be destroyed.&lt;br&gt;
        ptTable = Nothing&lt;br&gt;
        ptCache = Nothing&lt;br&gt;
        hoja = Nothing&lt;br&gt;
        libro = Nothing&lt;br&gt;
        AppExcel = Nothing&lt;br&gt;
    End Sub&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Ayuda porfavor:<br />
recibi el siguiente error al ejecutar el codigo de ejemplo para la tabla pivote</p>
<p>No se puede convertir el objeto COM del tipo &#8216;System.__ComObject&#8217; al tipo de interfaz &#8216;Microsoft.Office.Interop.Excel.Application&#8217;. Ocurrió un error de operación debido a que la llamada QueryInterface en el componente COM para la interfaz con IID &#8216;{000208D5-0000-0000-C000-000000000046}&#8217; generó el siguiente error: Biblioteca no registrada. (Excepción de HRESULT: 0×8002801D (TYPE_E_LIBNOTREGISTERED)).</p>
<p>el siguiente es el codigo de mi objeto:</p>
<p> Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click<br />
        Const conectabd As String = &#8220;data source = (local); initial catalog = Northwind; user id = sa; password = Administrador01?</p>
<p>        Const consulta As String = &#8220;SELECT * FROM Categories&#8221;</p>
<p>        &#8216;Dim AppExcel As Excel.Application<br />
        Dim AppExcel As Excel.Application<br />
        Try<br />
            &#8216;Grab a running instance of Excel.<br />
ERROR1 &#8212;&gt; AppExcel = Marshal.GetActiveObject(&#8220;Excel.Application&#8221;)&gt; en esta linea me marca error y si lo cambio por la siguiente linea  Me marca el mismo error ern la linea q tiene la etiqueta ERROR2<br />
            &#8216;    AppExcel = New Excel.Application<br />
        Catch ex As COMException<br />
            &#8216;If no instance exist then create a new one.<br />
            AppExcel = New Excel.Application<br />
            MessageBox.Show(&#8220;ese creo una nueva instancia por que no existia &#8221; &amp; ex.Message)<br />
        End Try</p>
<p>ERROR2 &#8212;&gt; Dim libro As Excel.Workbook = AppExcel.Workbooks.Add(Excel.XlWBATemplate.xlWBATWorksheet)</p>
<p>        Dim hoja As Excel.Worksheet = DirectCast(libro.Worksheets(1), Excel.Worksheet)<br />
        Dim rango As Excel.Range = DirectCast(hoja, Excel.Worksheet).Range(&#8220;B2?)</p>
<p>        &#8216;Create the Pivotcache.<br />
        Dim ptCache As Excel.PivotCache = libro.PivotCaches.Add(SourceType:=Excel.XlPivotTableSourceType.xlExternal)</p>
<p>        &#8216;Setup the Pivotcache.<br />
        With ptCache<br />
            .Connection = conectabd<br />
            .CommandText = consulta<br />
            .CommandType = Excel.XlCmdType.xlCmdSql<br />
        End With</p>
<p>        &#8216;Create the Pivottable.<br />
        Dim ptTable As Excel.PivotTable = _<br />
        hoja.PivotTables.Add( _<br />
        PivotCache:=ptCache, _<br />
        TableDestination:=rango, _<br />
        TableName:=&#8221;Tablapivotegenerada&#8221;)</p>
<p>        &#8216;Setup the Pivottable.<br />
        With ptTable<br />
            .ManualUpdate = True<br />
            .PivotFields(&#8220;ShipCountry&#8221;).Orientation = Excel.XlPivotFieldOrientation.xlRowField<br />
            .PivotFields(&#8220;# Of Shipments&#8221;).Orientation = Excel.XlPivotFieldOrientation.xlDataField<br />
            .PivotFields(&#8220;Total Freight&#8221;).Orientation = Excel.XlPivotFieldOrientation.xlDataField<br />
            .Format(Excel.XlPivotFormatType.xlReport2)<br />
            .ManualUpdate = False<br />
        End With</p>
<p>        libro.SaveAs(&#8220;c:EXCELReportEGENERADO.xls&#8221;)</p>
<p>        &#8216;Switch to Excel.<br />
        With AppExcel<br />
            .Visible = True<br />
            .UserControl = True<br />
        End With</p>
<p>        &#8216;Tell the Garbage Collector that these objects are ready to be destroyed.<br />
        ptTable = Nothing<br />
        ptCache = Nothing<br />
        hoja = Nothing<br />
        libro = Nothing<br />
        AppExcel = Nothing<br />
    End Sub</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Greenland</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/06/28/create-pivottable-reports-with-vbnet/#comment-48076</link>
		<dc:creator>David Greenland</dc:creator>
		<pubDate>Mon, 19 Jul 2010 11:26:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1177#comment-48076</guid>
		<description>&lt;p&gt;I am trying to convert your code to work with an excel worksheet of data without success - are you able to post an example using excel data please.&lt;/p&gt;
&lt;p&gt;Many thanks&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I am trying to convert your code to work with an excel worksheet of data without success &#8211; are you able to post an example using excel data please.</p>
<p>Many thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MJ</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/06/28/create-pivottable-reports-with-vbnet/#comment-47635</link>
		<dc:creator>MJ</dc:creator>
		<pubDate>Mon, 05 Jul 2010 10:54:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1177#comment-47635</guid>
		<description>&lt;p&gt;Pls Help:&lt;br&gt;
Im receiving this message : Unable to set the Orientation property of the PivotField class&lt;/p&gt;
&lt;p&gt;Dim xlApp As Excel.Application&lt;/p&gt;
&lt;p&gt;Dim stSql As String = &quot;select areaDescription, regionDescription, districtDescription, outletCode, materialCode, periodMonth, periodYear, SMBXCount, sttlastyearactualvolume from salesvolumefacts&quot;&lt;br&gt;
    &#039; Data Source works fine just not indicated    &lt;/p&gt;
&lt;p&gt;        Try&lt;br&gt;
            &#039;Grab a running instance of Excel.&lt;br&gt;
            xlApp = Marshal.GetActiveObject(&quot;Excel.Application&quot;)&lt;br&gt;
        Catch ex As COMException&lt;br&gt;
            &#039;If no instance exist then create a new one.&lt;br&gt;
            xlApp = New Excel.Application&lt;br&gt;
        End Try&lt;/p&gt;
&lt;p&gt;        Dim xlWBook As Excel.Workbook = xlApp.Workbooks.Add(Excel.XlWBATemplate.xlWBATWorksheet)&lt;br&gt;
        Dim xlWSheet As Excel.Worksheet = CType(xlWBook.Worksheets(1), Excel.Worksheet)&lt;br&gt;
        Dim xlRange As Excel.Range = CType(xlWSheet, Excel.Worksheet).Range(&quot;A2?)&lt;/p&gt;
&lt;p&gt;        &#039;Create the Pivotcache.&lt;br&gt;
        Dim ptCache As Excel.PivotCache = xlWBook.PivotCaches.Add( _&lt;br&gt;
        SourceType:=Excel.XlPivotTableSourceType.xlExternal)&lt;/p&gt;
&lt;p&gt;        &#039;Setup the Pivotcache.&lt;br&gt;
        With ptCache&lt;br&gt;
            .Connection = stCon&lt;br&gt;
            .CommandText = stSQL&lt;br&gt;
            .CommandType = Excel.XlCmdType.xlCmdSql&lt;br&gt;
        End With&lt;/p&gt;
&lt;p&gt;        &#039;Create the Pivottable.&lt;br&gt;
        Dim ptTable As Excel.PivotTable = _&lt;br&gt;
        xlWSheet.PivotTables.Add( _&lt;br&gt;
        PivotCache:=ptCache, _&lt;br&gt;
        TableDestination:=xlRange, _&lt;br&gt;
        TableName:=&quot;PT_Report&quot;)&lt;/p&gt;
&lt;p&gt;        &#039;Setup the Pivottable.&lt;br&gt;
        With ptTable&lt;br&gt;
            .ManualUpdate = True&lt;br&gt;
            .PivotFields(&quot;areaDescription&quot;).Orientation =  Excel.XlPivotFieldOrientation.xlRowField&lt;br&gt;
            .PivotFields(&quot;regionDescription&quot;).Orientation = Excel.XlPivotFieldOrientation.xlRowField&lt;br&gt;
            .PivotFields(&quot;districtDescription&quot;).Orientation = Excel.XlPivotFieldOrientation.xlRowField&lt;br&gt;
            .PivotFields(&quot;outletCode&quot;).Orientation = Excel.XlPivotFieldOrientation.xlRowField&lt;br&gt;
            .PivotFields(&quot;materialCode&quot;).Orientation = Excel.XlPivotFieldOrientation.xlRowField&lt;br&gt;
            .PivotFields(&quot;periodMonth&quot;).Orientation = Excel.XlPivotFieldOrientation.xlRowField&lt;br&gt;
            .PivotFields(&quot;periodYear&quot;).Orientation = Excel.XlPivotFieldOrientation.xlRowField&lt;br&gt;
            .PivotFields(&quot;SMBXCount&quot;).Orientation = Excel.XlPivotFieldOrientation.xlDataField&lt;br&gt;
            .PivotFields(&quot;sttlastyearactualvolume&quot;).Orientation = Excel.XlPivotFieldOrientation.xlDataField&lt;br&gt;
            .Format(Excel.XlPivotFormatType.xlReport2)&lt;br&gt;
        End With&lt;/p&gt;
&lt;p&gt;Thanks, MJ&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Pls Help:<br />
Im receiving this message : Unable to set the Orientation property of the PivotField class</p>
<p>Dim xlApp As Excel.Application</p>
<p>Dim stSql As String = &#8220;select areaDescription, regionDescription, districtDescription, outletCode, materialCode, periodMonth, periodYear, SMBXCount, sttlastyearactualvolume from salesvolumefacts&#8221;<br />
    &#8216; Data Source works fine just not indicated    </p>
<p>        Try<br />
            &#8216;Grab a running instance of Excel.<br />
            xlApp = Marshal.GetActiveObject(&#8220;Excel.Application&#8221;)<br />
        Catch ex As COMException<br />
            &#8216;If no instance exist then create a new one.<br />
            xlApp = New Excel.Application<br />
        End Try</p>
<p>        Dim xlWBook As Excel.Workbook = xlApp.Workbooks.Add(Excel.XlWBATemplate.xlWBATWorksheet)<br />
        Dim xlWSheet As Excel.Worksheet = CType(xlWBook.Worksheets(1), Excel.Worksheet)<br />
        Dim xlRange As Excel.Range = CType(xlWSheet, Excel.Worksheet).Range(&#8220;A2?)</p>
<p>        &#8216;Create the Pivotcache.<br />
        Dim ptCache As Excel.PivotCache = xlWBook.PivotCaches.Add( _<br />
        SourceType:=Excel.XlPivotTableSourceType.xlExternal)</p>
<p>        &#8216;Setup the Pivotcache.<br />
        With ptCache<br />
            .Connection = stCon<br />
            .CommandText = stSQL<br />
            .CommandType = Excel.XlCmdType.xlCmdSql<br />
        End With</p>
<p>        &#8216;Create the Pivottable.<br />
        Dim ptTable As Excel.PivotTable = _<br />
        xlWSheet.PivotTables.Add( _<br />
        PivotCache:=ptCache, _<br />
        TableDestination:=xlRange, _<br />
        TableName:=&#8221;PT_Report&#8221;)</p>
<p>        &#8216;Setup the Pivottable.<br />
        With ptTable<br />
            .ManualUpdate = True<br />
            .PivotFields(&#8220;areaDescription&#8221;).Orientation =  Excel.XlPivotFieldOrientation.xlRowField<br />
            .PivotFields(&#8220;regionDescription&#8221;).Orientation = Excel.XlPivotFieldOrientation.xlRowField<br />
            .PivotFields(&#8220;districtDescription&#8221;).Orientation = Excel.XlPivotFieldOrientation.xlRowField<br />
            .PivotFields(&#8220;outletCode&#8221;).Orientation = Excel.XlPivotFieldOrientation.xlRowField<br />
            .PivotFields(&#8220;materialCode&#8221;).Orientation = Excel.XlPivotFieldOrientation.xlRowField<br />
            .PivotFields(&#8220;periodMonth&#8221;).Orientation = Excel.XlPivotFieldOrientation.xlRowField<br />
            .PivotFields(&#8220;periodYear&#8221;).Orientation = Excel.XlPivotFieldOrientation.xlRowField<br />
            .PivotFields(&#8220;SMBXCount&#8221;).Orientation = Excel.XlPivotFieldOrientation.xlDataField<br />
            .PivotFields(&#8220;sttlastyearactualvolume&#8221;).Orientation = Excel.XlPivotFieldOrientation.xlDataField<br />
            .Format(Excel.XlPivotFormatType.xlReport2)<br />
        End With</p>
<p>Thanks, MJ</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: naveen</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/06/28/create-pivottable-reports-with-vbnet/#comment-45039</link>
		<dc:creator>naveen</dc:creator>
		<pubDate>Sat, 03 Apr 2010 13:29:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1177#comment-45039</guid>
		<description>&lt;p&gt;I am geeting the error &quot;Exception from HRESULT: 0×800A03EC&quot; near connection=stcon.&lt;br&gt;
Can anyone please help me out&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I am geeting the error &#8220;Exception from HRESULT: 0×800A03EC&#8221; near connection=stcon.<br />
Can anyone please help me out</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kenmax</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/06/28/create-pivottable-reports-with-vbnet/#comment-43254</link>
		<dc:creator>kenmax</dc:creator>
		<pubDate>Sun, 10 Jan 2010 07:45:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1177#comment-43254</guid>
		<description>&lt;p&gt;I also get the Exception: HRESULT: 0×800A03EC, in Line :&lt;br&gt;
With ptCache&lt;br&gt;
.Connection = stCon&lt;/p&gt;
&lt;p&gt;I want to get the OLAP cube data from Ms Analysis Service 9.0.&lt;br&gt;
I use this as my connection string&lt;br&gt;
Const stCon As String = _&lt;br&gt;
&quot;Provider=MSOLAP.3;Datasource=localhost; Initial Catalog=Analysis Services Project5;&quot;&lt;/p&gt;
&lt;p&gt;What should I do?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I also get the Exception: HRESULT: 0×800A03EC, in Line :<br />
With ptCache<br />
.Connection = stCon</p>
<p>I want to get the OLAP cube data from Ms Analysis Service 9.0.<br />
I use this as my connection string<br />
Const stCon As String = _<br />
&#8220;Provider=MSOLAP.3;Datasource=localhost; Initial Catalog=Analysis Services Project5;&#8221;</p>
<p>What should I do?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jean</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/06/28/create-pivottable-reports-with-vbnet/#comment-42533</link>
		<dc:creator>Jean</dc:creator>
		<pubDate>Thu, 03 Dec 2009 07:26:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1177#comment-42533</guid>
		<description>&lt;p&gt;Just use:&lt;br&gt;
OLEDB;Provider=SQLOLEDB.1;Data Source=127.0.0.1;Initial Catalog=yourDB;User Id=sa;Password=;Connect Timeout=0&lt;/p&gt;
&lt;p&gt;(Note the &quot;OLEDB;&quot; before your connectionstring)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Just use:<br />
OLEDB;Provider=SQLOLEDB.1;Data Source=127.0.0.1;Initial Catalog=yourDB;User Id=sa;Password=;Connect Timeout=0</p>
<p>(Note the &#8220;OLEDB;&#8221; before your connectionstring)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DMC</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/06/28/create-pivottable-reports-with-vbnet/#comment-40937</link>
		<dc:creator>DMC</dc:creator>
		<pubDate>Fri, 11 Sep 2009 16:05:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1177#comment-40937</guid>
		<description>&lt;p&gt;tried all of the following styles of Conn - no resolution:&lt;/p&gt;
&lt;p&gt;        &#039;Const stCon As String = &quot;Provider=sqloledb;Data Source=XXX;Initial Catalog=Dw_YYY;Integrated Security=SSPI; &quot; &#039;OLEDB Trusted Connection&lt;br&gt;
        &#039;Const stCon As String = &quot;Driver={SQL Server};Server=XXX;Database=Dw_YYY;Uid=ro;Pwd=; &quot; &#039;ODBC DB Login&lt;br&gt;
        &#039;Const stCon As String = &quot;Driver={SQL Server};Server=XXX;Database=Dw_YYY;Trusted_Connection=yes; &quot; &#039;ODBC Trusted connection&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>tried all of the following styles of Conn &#8211; no resolution:</p>
<p>        &#8216;Const stCon As String = &#8220;Provider=sqloledb;Data Source=XXX;Initial Catalog=Dw_YYY;Integrated Security=SSPI; &#8221; &#8216;OLEDB Trusted Connection<br />
        &#8216;Const stCon As String = &#8220;Driver={SQL Server};Server=XXX;Database=Dw_YYY;Uid=ro;Pwd=; &#8221; &#8216;ODBC DB Login<br />
        &#8216;Const stCon As String = &#8220;Driver={SQL Server};Server=XXX;Database=Dw_YYY;Trusted_Connection=yes; &#8221; &#8216;ODBC Trusted connection</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DMC</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/06/28/create-pivottable-reports-with-vbnet/#comment-40936</link>
		<dc:creator>DMC</dc:creator>
		<pubDate>Fri, 11 Sep 2009 15:53:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1177#comment-40936</guid>
		<description>&lt;p&gt;actual error appears when setting the ptCache object and therefore before the .Connection:&lt;/p&gt;
&lt;p&gt;Error =&lt;br&gt;
&quot;   at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&amp; msgData)&lt;br&gt;
   at Microsoft.Office.Interop.Excel.PivotCache.get_ADOConnection()&quot;&lt;/p&gt;
&lt;p&gt;Connection : {&quot;Not an ODBC data source or Web query&quot;}&lt;/p&gt;
&lt;p&gt;i changed the line to:&lt;br&gt;
Dim ptCache As Excel.PivotCache = CType(xlWBook, Excel.Workbook).PivotCaches.Add(SourceType:=Excel.XlPivotTableSourceType.xlExternal)&lt;/p&gt;
&lt;p&gt;but still received the same error.&lt;/p&gt;
&lt;p&gt;the structure of the strConn is:&lt;/p&gt;
&lt;p&gt;       Const stCon As String = _&lt;br&gt;
            &quot;Server=xyzzz;&quot; &amp; _&lt;br&gt;
            &quot;DataBase=Db_MyDb;&quot; &amp; _&lt;br&gt;
            &quot;Uid=ro;&quot;&lt;/p&gt;
&lt;p&gt;The server &quot;xyzzz&quot; can be pinged ok.&lt;/p&gt;
&lt;p&gt;i will try to redo the strConn and see if this helps.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>actual error appears when setting the ptCache object and therefore before the .Connection:</p>
<p>Error =<br />
&#8221;   at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&amp; msgData)<br />
   at Microsoft.Office.Interop.Excel.PivotCache.get_ADOConnection()&#8221;</p>
<p>Connection : {&#8220;Not an ODBC data source or Web query&#8221;}</p>
<p>i changed the line to:<br />
Dim ptCache As Excel.PivotCache = CType(xlWBook, Excel.Workbook).PivotCaches.Add(SourceType:=Excel.XlPivotTableSourceType.xlExternal)</p>
<p>but still received the same error.</p>
<p>the structure of the strConn is:</p>
<p>       Const stCon As String = _<br />
            &#8220;Server=xyzzz;&#8221; &amp; _<br />
            &#8220;DataBase=Db_MyDb;&#8221; &amp; _<br />
            &#8220;Uid=ro;&#8221;</p>
<p>The server &#8220;xyzzz&#8221; can be pinged ok.</p>
<p>i will try to redo the strConn and see if this helps.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

