<?xml version="1.0" encoding="iso-8859-1" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Dansk Regneark Forum : Export af Query data til Excel</title>
  <link>https://forum.excel-regneark.dk/</link>
  <description><![CDATA[Dette er et XML Feed af; Dansk Regneark Forum : Makro og VBA : Export af Query data til Excel]]></description>
  <pubDate>Sat, 05 Dec 2026 13:23:15 +0000</pubDate>
  <lastBuildDate>Sat, 15 Sep 2012 17:29:31 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.08</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>https://forum.excel-regneark.dk/RSS_post_feed.asp?TID=890</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Dansk Regneark Forum]]></title>
   <url>https://forum.excel-regneark.dk/css_styles/Excel-regneark.dk/logo.png</url>
   <link>https://forum.excel-regneark.dk/</link>
  </image>
  <item>
   <title><![CDATA[Export af Query data til Excel : Nu er jeg kommet en del videre...]]></title>
   <link>https://forum.excel-regneark.dk/export-af-query-data-til-excel_topic890_post4338.html#4338</link>
   <description>
    <![CDATA[<strong>Forfatter:</strong> <a href="https://forum.excel-regneark.dk/member_profile.asp?PF=636">Ronni89</a><br /><strong>Emne:</strong> 890<br /><strong>Sendt:</strong> 15.Sep.2012 kl. 17:29<br /><br /><div>Nu er jeg kommet en del videre med det, med hjælp fra&nbsp;<a href="http://www.dailydoseofexcel.com/archives/2011/03/08/get-data-from-website-that-requires-a-login/" target="_blank">http://www.dailydoseofexcel.com/archives/2011/03/08/get-data-from-website-that-requires-a-login/</a></div><div>Jeg har dog et problem, da der ingen Tabel ID er på denne side. Kan jeg sætte hele siden ind på nogen måde?</div><div><br></div><div>Sub GetTable()</div><div>&nbsp; &nbsp;</div><div>&nbsp; &nbsp; Dim ieApp As InternetExplorer</div><div>&nbsp; &nbsp; Dim ieDoc As Object</div><div>&nbsp; &nbsp; Dim ieTable As Object</div><div>&nbsp; &nbsp; Dim clip As DataObject</div><div>&nbsp; &nbsp;</div><div>&nbsp; &nbsp; 'create a new instance of ie</div><div>&nbsp; &nbsp;Set ieApp = New InternetExplorer</div><div>&nbsp; &nbsp;</div><div>&nbsp; &nbsp; 'you don’t need this, but it’s good for debugging</div><div>&nbsp; &nbsp;ieApp.Visible = True</div><div>&nbsp; &nbsp;</div><div>&nbsp; &nbsp; 'assume we’re not logged in and just go directly to the login page</div><div>&nbsp; &nbsp;ieApp.navigate "http://www.installationsblanket.dk/Logon.asp"</div><div>&nbsp; &nbsp; Do While ieApp.Busy: DoEvents: Loop</div><div>&nbsp; &nbsp; Do Until ieApp.readyState = READYSTATE_COMPLETE: DoEvents: Loop</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div>&nbsp; &nbsp; Set ieDoc = ieApp.document</div><div>&nbsp; &nbsp;</div><div>&nbsp; &nbsp; 'fill in the login form – View Source from your browser to get the control names</div><div>&nbsp; &nbsp;With ieDoc.forms(0)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .Brugernavn.Value = "***"</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .Adgangskode.Value = "***"</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .submit</div><div>&nbsp; &nbsp; End With</div><div>&nbsp; &nbsp; Do While ieApp.Busy: DoEvents: Loop</div><div>&nbsp; &nbsp; Do Until ieApp.readyState = READYSTATE_COMPLETE: DoEvents: Loop</div><div>&nbsp; &nbsp;</div><div>&nbsp; &nbsp; 'now that we’re in, go to the page we want</div><div>&nbsp; &nbsp;ieApp.navigate "http://www.installationsblanket.dk/selskab/600.asp"</div><div>&nbsp; &nbsp; Do While ieApp.Busy: DoEvents: Loop</div><div>&nbsp; &nbsp; Do Until ieApp.readyState = READYSTATE_COMPLETE: DoEvents: Loop</div><div>&nbsp; &nbsp;</div><div>&nbsp; &nbsp; 'get the table based on the table’s id</div><div>&nbsp; &nbsp;Set ieDoc = ieApp.document</div><div>&nbsp; &nbsp; Set ieTable = ieDoc.all.Item("Bottom")</div><div>&nbsp; &nbsp;</div><div>&nbsp; &nbsp; 'copy the tables html to the clipboard and paste to teh sheet</div><div>&nbsp; &nbsp;If Not ieTable Is Nothing Then</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Set clip = New DataObject</div><div>&nbsp; &nbsp; &nbsp; &nbsp; clip.SetText "&lt;html&gt;" &amp; MieTable.outerHTML &amp; "&lt;/html&gt;"</div><div>&nbsp; &nbsp; &nbsp; &nbsp; clip.PutInClipboard</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Sheet1.Select</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Sheet1.Range("A1").Select</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Sheet1.PasteSpecial "Unicode Text"</div><div>&nbsp; &nbsp; End If</div><div>&nbsp; &nbsp;</div><div>&nbsp; &nbsp; 'close 'er up</div><div>&nbsp; &nbsp;ieApp.Quit</div><div>&nbsp; &nbsp; Set ieApp = Nothing</div><div>&nbsp; &nbsp;</div><div>End Sub</div><div><br></div>]]>
   </description>
   <pubDate>Sat, 15 Sep 2012 17:29:31 +0000</pubDate>
   <guid isPermaLink="true">https://forum.excel-regneark.dk/export-af-query-data-til-excel_topic890_post4338.html#4338</guid>
  </item> 
  <item>
   <title><![CDATA[Export af Query data til Excel : Hej Alle.Jeg skal hente en data...]]></title>
   <link>https://forum.excel-regneark.dk/export-af-query-data-til-excel_topic890_post4337.html#4337</link>
   <description>
    <![CDATA[<strong>Forfatter:</strong> <a href="https://forum.excel-regneark.dk/member_profile.asp?PF=636">Ronni89</a><br /><strong>Emne:</strong> 890<br /><strong>Sendt:</strong> 15.Sep.2012 kl. 12:54<br /><br />Hej Alle.<div><br></div><div>Jeg skal hente en data tabel fra en webside med login og password.&nbsp;</div><div><a href="http://www.installati&#111;nsblanket.dk/log&#111;n.asp" target="_blank">http://www.installationsblanket.dk/logon.asp</a></div><div>Jeg kommer forbi denne side og næste side er:</div><div><a href="http://www.installati&#111;nsblanket.dk/selskab/500.asp" target="_blank">http://www.installationsblanket.dk/selskab/500.asp</a></div><div>Det er dog ikke på denne side jeg skal hente tabellen, og muligvis derfor får jeg fejlmeddelelsen Run-time error 1004, application-defined ot object-defines error. Jeg skal klikke på "et link" her for at navigere til:</div><div><a href="http://www.installati&#111;nsblanket.dk/selskab/600.asp" target="_blank">http://www.installationsblanket.dk/selskab/600.asp</a></div><div>som er siden jeg skal hente tabellen fra.&nbsp;</div><div><br></div><div>Kan nogle hjælpe mig med at navigere videre på siden, eller se hvad der ellers er galt? det er som om jeg mangler at kunne sætte et step ind.</div><div><br></div><div><div>Sub Basic_Web_Query()</div><div><br></div><div>Set ie = CreateObject("InternetExplorer.Application")</div><div>&nbsp; &nbsp; With ie</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .Visible = True</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .navigate "http://www.installationsblanket.dk/logon.asp"</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Do Until .readyState = READYSTATE_COMPLETE</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DoEvents</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Loop</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .document.all.Item("BRUGERNAVN").Value = "Bruger"</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .document.all.Item("ADGANGSKODE").Value = "Adgangskode"</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .document.forms(0).submit</div><div>&nbsp; &nbsp; End With</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; With ActiveSheet.QueryTables.Add(Connection:= _</div><div>&nbsp; &nbsp; &nbsp; &nbsp; "URL;http://www.installationsblanket.dk/selskab/600-main.asp", Destination:= _</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Range("$A$1"))</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .Name = "600-main"</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .FieldNames = True</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .RowNumbers = False</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .FillAdjacentFormulas = False</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .PreserveFormatting = True</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .RefreshOnFileOpen = False</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .BackgroundQuery = True</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .RefreshStyle = xlInsertDeleteCells</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .SavePassword = False</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .SaveData = True</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .AdjustColumnWidth = True</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .RefreshPeriod = 0</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .WebSelectionType = xlEntirePage</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .WebFormatting = xlWebFormattingNone</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .WebPreFormattedTextToColumns = True</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .WebConsecutiveDelimitersAsOne = True</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .WebSingleBlockTextImport = False</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .WebDisableDateRecognition = False</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .WebDisableRedirections = False</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .Refresh BackgroundQuery:=False</div><div>&nbsp; &nbsp; End With</div><div>End Sub</div></div><div><br></div><div>Bruger og adgangskode er sløret.</div><div>På forhånd tak.</div>]]>
   </description>
   <pubDate>Sat, 15 Sep 2012 12:54:58 +0000</pubDate>
   <guid isPermaLink="true">https://forum.excel-regneark.dk/export-af-query-data-til-excel_topic890_post4337.html#4337</guid>
  </item> 
 </channel>
</rss>