<?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: Auto Create Reports from Web Links</title>
	<atom:link href="http://sfdc.arrowpointe.com/2005/06/09/auto-create-reports-from-web-links/feed/" rel="self" type="application/rss+xml" />
	<link>http://sfdc.arrowpointe.com/2005/06/09/auto-create-reports-from-web-links/</link>
	<description>Authored by Scott Hemmeter of Arrowpointe Corp, this blog is written from the perspective of a Salesforce.com solution provider and contains information on Arrowpointe's AppExchange products as well as tips, findings, sample code, functionality wishes, etc.</description>
	<lastBuildDate>Mon, 26 Jul 2010 02:42:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Peter Yao</title>
		<link>http://sfdc.arrowpointe.com/2005/06/09/auto-create-reports-from-web-links/comment-page-1/#comment-63157</link>
		<dc:creator>Peter Yao</dc:creator>
		<pubDate>Mon, 26 Jul 2010 02:42:24 +0000</pubDate>
		<guid isPermaLink="false">http://sfdc.arrowpointe.com/2005/10/24/auto-create-reports-from-web-links/#comment-63157</guid>
		<description>Scott,

I&#039;ve been using this for years - thanks for posting! I find it very helpful in conjunction with Firefox&#039;s keyword shortcuts.

Our marketing group recently needed a way to pass a parameter to a report via &quot;Connect for Office&quot; (the Excel plugin that is supported by Salesforce). The only way I could figure it out is to write a little macro that uses your pv0 trick (see below). It&#039;s still in the works, but thanks for posting your trick!

Peter

Sub ImportReport()
    Dim url As String
    Dim wSSummary As Worksheet
    Dim wSData As Worksheet

    Set wSSummary = Sheets(&quot;Summary Sheet&quot;)
    Set wSData = Sheets(&quot;Data Sheet&quot;)
 
    &#039; Clear data sheet
    LastRow = wSData.UsedRange.Rows.Count
    wSData.Range(&quot;1:1&quot;, wSData.UsedRange.Rows.Count &amp; &quot;:&quot; &amp; wSData.UsedRange.Rows.Count).Delete
    
     &#039; Import 00O30000004W4B4 report to data sheet using parameter on Summary!C4
   url = &quot;URL;https://na1-api.salesforce.com/00O30000004W4B4?isExcel=1&amp;pv0=&quot; &amp; _
        wSSummary.Range(&quot;C4&quot;) &amp; _
        &quot;&amp;export=1&amp;xf=cls&amp;enc=UTF-8&quot;
    With wSData.QueryTables.Add(Connection:=url, Destination:=wSData.Range(&quot;A1&quot;))
        .Name = &quot;Data Import&quot;
        .RowNumbers = False
        .FillAdjacentFormulas = False
        .PreserveFormatting = True
        .RefreshOnFileOpen = False
        .BackgroundQuery = False
        .RefreshStyle = xlOverwriteCells
        .SavePassword = False
        .SaveData = True
        .AdjustColumnWidth = True
        .RefreshPeriod = 0
        .WebSelectionType = xlEntirePage
        .WebFormatting = xlWebFormattingNone
        .WebPreFormattedTextToColumns = True
        .WebConsecutiveDelimitersAsOne = True
        .WebSingleBlockTextImport = False
        .WebDisableDateRecognition = False
        .WebDisableRedirections = False
        .Refresh
    End With

    &#039; The last 5 rows are report metadata
    wSData.Range(wSData.UsedRange.Rows.Count - 5 &amp; &quot;:&quot; &amp; wSData.UsedRange.Rows.Count - 5, wSData.UsedRange.Rows.Count &amp; &quot;:&quot; &amp; wSData.UsedRange.Rows.Count).Delete

    &#039; Reports are imported as csv, reformat to columns
    wSData.Range(&quot;A:A&quot;).TextToColumns Destination:=wSData.Range(&quot;A1&quot;), DataType:=xlDelimited, _
        TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
        Semicolon:=False, Comma:=True, Space:=False, Other:=False, _
        TrailingMinusNumbers:=True

    wSData.Range(&quot;A:A&quot;).Columns.AutoFit
    
End Sub</description>
		<content:encoded><![CDATA[<p>Scott,</p>
<p>I&#8217;ve been using this for years &#8211; thanks for posting! I find it very helpful in conjunction with Firefox&#8217;s keyword shortcuts.</p>
<p>Our marketing group recently needed a way to pass a parameter to a report via &#8220;Connect for Office&#8221; (the Excel plugin that is supported by Salesforce). The only way I could figure it out is to write a little macro that uses your pv0 trick (see below). It&#8217;s still in the works, but thanks for posting your trick!</p>
<p>Peter</p>
<p>Sub ImportReport()<br />
    Dim url As String<br />
    Dim wSSummary As Worksheet<br />
    Dim wSData As Worksheet</p>
<p>    Set wSSummary = Sheets(&#8220;Summary Sheet&#8221;)<br />
    Set wSData = Sheets(&#8220;Data Sheet&#8221;)</p>
<p>    &#8216; Clear data sheet<br />
    LastRow = wSData.UsedRange.Rows.Count<br />
    wSData.Range(&#8220;1:1&#8243;, wSData.UsedRange.Rows.Count &amp; &#8220;:&#8221; &amp; wSData.UsedRange.Rows.Count).Delete</p>
<p>     &#8216; Import 00O30000004W4B4 report to data sheet using parameter on Summary!C4<br />
   url = &#8220;URL;https://na1-api.salesforce.com/00O30000004W4B4?isExcel=1&amp;pv0=&#8221; &amp; _<br />
        wSSummary.Range(&#8220;C4&#8243;) &amp; _<br />
        &#8220;&amp;export=1&amp;xf=cls&amp;enc=UTF-8&#8243;<br />
    With wSData.QueryTables.Add(Connection:=url, Destination:=wSData.Range(&#8220;A1&#8243;))<br />
        .Name = &#8220;Data Import&#8221;<br />
        .RowNumbers = False<br />
        .FillAdjacentFormulas = False<br />
        .PreserveFormatting = True<br />
        .RefreshOnFileOpen = False<br />
        .BackgroundQuery = False<br />
        .RefreshStyle = xlOverwriteCells<br />
        .SavePassword = False<br />
        .SaveData = True<br />
        .AdjustColumnWidth = True<br />
        .RefreshPeriod = 0<br />
        .WebSelectionType = xlEntirePage<br />
        .WebFormatting = xlWebFormattingNone<br />
        .WebPreFormattedTextToColumns = True<br />
        .WebConsecutiveDelimitersAsOne = True<br />
        .WebSingleBlockTextImport = False<br />
        .WebDisableDateRecognition = False<br />
        .WebDisableRedirections = False<br />
        .Refresh<br />
    End With</p>
<p>    &#8216; The last 5 rows are report metadata<br />
    wSData.Range(wSData.UsedRange.Rows.Count &#8211; 5 &amp; &#8220;:&#8221; &amp; wSData.UsedRange.Rows.Count &#8211; 5, wSData.UsedRange.Rows.Count &amp; &#8220;:&#8221; &amp; wSData.UsedRange.Rows.Count).Delete</p>
<p>    &#8216; Reports are imported as csv, reformat to columns<br />
    wSData.Range(&#8220;A:A&#8221;).TextToColumns Destination:=wSData.Range(&#8220;A1&#8243;), DataType:=xlDelimited, _<br />
        TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _<br />
        Semicolon:=False, Comma:=True, Space:=False, Other:=False, _<br />
        TrailingMinusNumbers:=True</p>
<p>    wSData.Range(&#8220;A:A&#8221;).Columns.AutoFit</p>
<p>End Sub</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Douglas</title>
		<link>http://sfdc.arrowpointe.com/2005/06/09/auto-create-reports-from-web-links/comment-page-1/#comment-62943</link>
		<dc:creator>Jeff Douglas</dc:creator>
		<pubDate>Mon, 05 Apr 2010 13:30:05 +0000</pubDate>
		<guid isPermaLink="false">http://sfdc.arrowpointe.com/2005/10/24/auto-create-reports-from-web-links/#comment-62943</guid>
		<description>Scott, this is AWESOME! Thanks for the post. This is exactly what I need to solve a problem of NOT building 1M reports.</description>
		<content:encoded><![CDATA[<p>Scott, this is AWESOME! Thanks for the post. This is exactly what I need to solve a problem of NOT building 1M reports.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
