<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>yadUK - Effective Information System Solutions &#187; Reference</title>
	<atom:link href="http://www.yaduk.co.uk/category/blog/code-snippets/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.yaduk.co.uk</link>
	<description>Effective Information System Solutions</description>
	<lastBuildDate>Thu, 01 Apr 2010 18:43:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>&#8220;NOT&#8221; &#8211; Yaduk&#8217;s Music Profile – Users at Last.fm</title>
		<link>http://www.yaduk.co.uk/2010/04/01/not-yaduks-music-profile-%e2%80%93-users-at-last-fm/</link>
		<comments>http://www.yaduk.co.uk/2010/04/01/not-yaduks-music-profile-%e2%80%93-users-at-last-fm/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 18:43:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Reference]]></category>

		<guid isPermaLink="false">http://www.yaduk.co.uk/?p=432</guid>
		<description><![CDATA[<p>How bizarre! From link searching I came across a profile on Last.fm with &#8216;Yaduk&#8217; rather as titled yadUK. Some damn good google lurve on the seach term yaduk as one might expect!?</p>
<p>A quick wiggle of the &#8216;ol mouse finger and I&#8217;m in a strange parallel universe with a twist and&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>How bizarre! From link searching I came across a profile on Last.fm with &#8216;Yaduk&#8217; rather as titled yadUK. Some damn good google lurve on the seach term yaduk as one might expect!?</p>
<p>A quick wiggle of the &#8216;ol mouse finger and I&#8217;m in a strange parallel universe with a twist and an unknown music list. Now, whilst there&#8217;s some not bad music in that list &#8230; I categorically state that ain&#8217;t me! ;)</p>
<p>The Internet. What can one say?</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.yaduk.co.uk/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.yaduk.co.uk/2010/04/01/not-yaduks-music-profile-%e2%80%93-users-at-last-fm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exporting SharePoint People &amp; Groups</title>
		<link>http://www.yaduk.co.uk/2010/03/16/exporting-sharepoint-people-groups/</link>
		<comments>http://www.yaduk.co.uk/2010/03/16/exporting-sharepoint-people-groups/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 14:58:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Reference]]></category>
		<category><![CDATA[sharepoint]]></category>

		<guid isPermaLink="false">http://www.yaduk.co.uk/?p=424</guid>
		<description><![CDATA[<p>You can export the &#8220;People &#38; Groups&#8221; section to an XL spreadsheet by hinging through the owssvr DLL. However, you&#8217;re going to need the SSID for both your &#8216;List&#8217; and whichever &#8216;View&#8217; also to get it to work.</p>
<p>To obtain both of these:</p>
<p><strong>List SSID</strong> &#8211; Goto the &#8220;People &#38;&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>You can export the &#8220;People &amp; Groups&#8221; section to an XL spreadsheet by hinging through the owssvr DLL. However, you&#8217;re going to need the SSID for both your &#8216;List&#8217; and whichever &#8216;View&#8217; also to get it to work.</p>
<p>To obtain both of these:</p>
<p><strong>List SSID</strong> &#8211; Goto the &#8220;People &amp; Groups&#8221; list you want to export and goto &#8220;Settings &gt;&gt; List Settings&#8221;. Then click on &#8220;Create Column&#8221;. From there you see in the URL fldNew.aspx?List=%7B blah %7D</p>
<p>^^ Take the long string between the %7B and %7D at either end. Do not take the %7B nor the %7D at either end &lt;&#8211; important!</p>
<p><strong>View SSID</strong> &#8211; just goto your &#8220;People &amp; Groups&#8221; list and choose the &#8220;Detail View&#8221; which will initiate it and you&#8217;ll get in the URL blahblah&amp;View={the SSID}</p>
<p>^^ Take the SSID without the curly braces this time and place them in the following URL string at the appropriate places with your SITEURL also:</p>
<p><a href="http://[SITEURL]/_vti_bin/owssvr.dll?CS=109&amp;Using=_layouts/query.iqy&amp;List=[LISTID]&amp;View=[VIEWID]&amp;CacheControl=1">http://[SITEURL]/_vti_bin/owssvr.dll?CS=109&amp;Using=_layouts/query.iqy&amp;List=[LISTID]&amp;View=[VIEWID]&amp;CacheControl=1</a></p>
<p>From there you&#8217;ll get an export of the contents of your group from which you can copy &#8216;n paste the email addresses into your new site.</p>
<p>You&#8217;ll need to create a new XL column and concatenate the email address with a semi-colon after it prior to pasting the emails in.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.yaduk.co.uk/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.yaduk.co.uk/2010/03/16/exporting-sharepoint-people-groups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BCS &#8211; Social Networking Article</title>
		<link>http://www.yaduk.co.uk/2010/01/30/bcs-social-networking-article/</link>
		<comments>http://www.yaduk.co.uk/2010/01/30/bcs-social-networking-article/#comments</comments>
		<pubDate>Sat, 30 Jan 2010 19:31:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Reference]]></category>
		<category><![CDATA[social networking]]></category>

		<guid isPermaLink="false">http://www.yaduk.co.uk/?p=416</guid>
		<description><![CDATA[<p>Fantastic article in the latest ITNow magazine in regards to Social Networking &#8216;in the business&#8217;. Simon Morris of Pentura lays down some great pointers on how best to manage and secure such systems against their use in collaborative and strangely &#8216;Social Networking&#8217; activities.</p>
<p>Do look back to a post here:&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>Fantastic article in the latest ITNow magazine in regards to Social Networking &#8216;in the business&#8217;. Simon Morris of Pentura lays down some great pointers on how best to manage and secure such systems against their use in collaborative and strangely &#8216;Social Networking&#8217; activities.</p>
<p>Do look back to a post here: <a title="Check out a yadUK previous post" href="http://www.yaduk.co.uk/2009/11/16/building-an-online-community-organisational-intranet/" target="_self">Building an online community organisational Intranet</a> where a discussion on &#8216;Social Networking&#8217; within your own organisational Intranet establishes collaborative activites enabling your business rather as hindering!</p>
<p>Further articles are available at <a title="BCS Social Media Articles" href="http://www.bcs.org/socialmedia" target="_blank">http://www.bcs.org/socialmedia</a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.yaduk.co.uk/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.yaduk.co.uk/2010/01/30/bcs-social-networking-article/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Restart haldaemon and dbus Commands for CentOS 5.2</title>
		<link>http://www.yaduk.co.uk/2009/08/18/restart-haldaemon-and-dbus-commands-for-centos-5-2/</link>
		<comments>http://www.yaduk.co.uk/2009/08/18/restart-haldaemon-and-dbus-commands-for-centos-5-2/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 17:42:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Reference]]></category>
		<category><![CDATA[CentOS]]></category>

		<guid isPermaLink="false">http://www.yaduk.co.uk/?p=374</guid>
		<description><![CDATA[<p>/etc/init.d/messagebus restart<br />
/etc/init.d/haldaemon restart</p>
]]></description>
			<content:encoded><![CDATA[<p>/etc/init.d/messagebus restart<br />
/etc/init.d/haldaemon restart</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.yaduk.co.uk/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.yaduk.co.uk/2009/08/18/restart-haldaemon-and-dbus-commands-for-centos-5-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript English Stoplists / Stopwords</title>
		<link>http://www.yaduk.co.uk/2009/08/03/javascript-english-stoplists-stopword/</link>
		<comments>http://www.yaduk.co.uk/2009/08/03/javascript-english-stoplists-stopword/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 12:18:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Reference]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.yaduk.co.uk/?p=373</guid>
		<description><![CDATA[<p>Not listed verbs, adjectives nor articles but the below arrays are very handy should one be running language based queries over rendered pages.</p>
<p>Why? I dunno &#8230; say you&#8217;re trying to make a tag cloud or something but it&#8217;s full of filler words!</p>
<p>Articles are &#8220;a&#8221;, &#8220;an&#8221; and &#8220;the&#8221; only&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>Not listed verbs, adjectives nor articles but the below arrays are very handy should one be running language based queries over rendered pages.</p>
<p>Why? I dunno &#8230; say you&#8217;re trying to make a tag cloud or something but it&#8217;s full of filler words!</p>
<p>Articles are &#8220;a&#8221;, &#8220;an&#8221; and &#8220;the&#8221; only for English. Verbs and adjectives, well that&#8217;ll be down to what you&#8217;re up to I guess?!</p>
<textarea cols="40" rows="10" name="code" class="JScript">var prepositions = ["aboard","about","above","across","after","against","along","amid","among","anti","around","as","at","before","behind","below","beneath","beside","besides","between","beyond","but","by","concerning","considering","despite","down","during","except","excepting","excluding","following","for","from","in","inside","into","like","minus","near","of","off","on","onto","opposite","outside","over","past","per","plus","regarding","round","save","since","than","through","to","toward","towards","under","underneath","unlike","until","up","upon","versus","via","with","within","without"]

var conjunctions = ["after","although","and","as","as far as","as how","as if","as long as","as soon as","as though","as well as","because","before","both","but","either","even if","even though","for","how","however","if","if only","in case","in order that","neither","nor","now","once","only","or","provided","rather than","since","so","so that","than","that","though","till","unless","until","when","whenever","where","whereas","wherever","whether","while","yet"]

var pronouns = ["all","another","any","anybody","anyone","anything","both","each","each other","either","everybody","everyone","everything","few","he","her","hers","herself","him","himself","his","I","it","its","itself","little","many","me","mine","more","most","much","myself","neither","no one","nobody","none","nothing","one","one another","other","others","ours","ourselves", "several","she","some","somebody","someone","something","that","theirs","them","themselves","these","they","this","those","us","we","what","whatever","which","whichever","who","whoever","whom","whomever","whose","you","yours","yourself","yourselves"]</textarea>
	<!-- WordPress Code Snippet -->
	<script type="text/javascript" src="http://www.yaduk.co.uk/wp-content/plugins/wordpress-code-snippet/js/shCore.js"></script><script type="text/javascript" src="http://www.yaduk.co.uk/wp-content/plugins/wordpress-code-snippet/js/shBrushJScript.js"></script>
	<link type="text/css" rel="stylesheet" href="http://www.yaduk.co.uk/wp-content/plugins/wordpress-code-snippet/css/SyntaxHighlighter.css"/>
	
	<script language="javascript">
	dp.SyntaxHighlighter.ClipboardSwf = 'http://www.yaduk.co.uk/wp-content/plugins/wordpress-code-snippet/js/clipboard.swf';
	dp.SyntaxHighlighter.HighlightAll('code');
	</script>
	<!-- End WordPress Code Snippet -->
	<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.yaduk.co.uk/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.yaduk.co.uk/2009/08/03/javascript-english-stoplists-stopword/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript Export HTML table to MS Excel (JScript)</title>
		<link>http://www.yaduk.co.uk/2009/07/22/javascript-export-html-table-excel-jscript/</link>
		<comments>http://www.yaduk.co.uk/2009/07/22/javascript-export-html-table-excel-jscript/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 11:19:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Reference]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.yaduk.co.uk/?p=371</guid>
		<description><![CDATA[<p>Here&#8217;s a little code snippet to export an HTML table to MS Excel through utilising ActiveXObject(&#8220;Excel.Application&#8221;) from Internet Explorer.</p>
<p>The JavaScript (in this case utilising Microsoft&#8217;s JScript) runs over the table displayed pulling out the relevant data and exporting into the instantiated copy of Excel. This is a working example&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a little code snippet to export an HTML table to MS Excel through utilising ActiveXObject(&#8220;Excel.Application&#8221;) from Internet Explorer.</p>
<p>The JavaScript (in this case utilising Microsoft&#8217;s JScript) runs over the table displayed pulling out the relevant data and exporting into the instantiated copy of Excel. This is a working example based loosely on Microsoft&#8217;s <a href="http://support.microsoft.com/kb/234774">http://support.microsoft.com/kb/234774</a> Knowledgebase Article &#8220;How to automate Excel from an HTML Web page by using JScript&#8221;.</p>
<p>Worth noting is that the garbage collection between the JScript and MS Excel doesn&#8217;t work too well and more often than not one can be left with the instantiated copy of MS Excel still in memory (see it in the Task Manager). One must manually remove these instances.</p>
<p>Perhaps dynamically inputting a module to clean up from within MS Excel on the workbook deactivating might clear this up &#8211; not tried this though!?</p>
<textarea cols="40" rows="10" name="code" class="Xml"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Export to Excel Example</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="charset" content="iso-8859-1" />
<meta http-equiv="content-language" content="english" />
<meta http-equiv="expires" content="-1" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="imagetoolbar" content="false" />
<style>
body {
   margin: 0;
   font-family: verdana,arial,helvetica,sans-serif;
   font-size: .85em;
   padding: 3px;
}
th {background-color:#ccd;}
.odd{background-color:#DDDBDB;}
.even{background-color:#CECCCC;}

</style>
<script language="javascript" type="text/javascript">  
function ExportToExcel() {
	input_box=confirm("Export rows of table data to MS Excel?");
		if (input_box==true) {
			
			var xlApp = new ActiveXObject("Excel.Application");
			// Silent-mode:
			xlApp.Visible = true;
			xlApp.DisplayAlerts = false;
			var xlBook = xlApp.Workbooks.Add();
			xlBook.worksheets("Sheet1").activate;
			var XlSheet = xlBook.activeSheet;
			XlSheet.Name="JavaScript Export to Excel";
			
			// Store the sheet header names in an array
			var rows = tabletoexport.getElementsByTagName("tr");
			var columns = tabletoexport.getElementsByTagName("th");
			var data = tabletoexport.getElementsByTagName("td");
			
  			// Set Excel Column Headers and formatting from array
			for(i=0;i<columns.length;i++){
	   			XlSheet.cells(1,i+1).value= columns[i].innerText; //XlSheetHeader[i];
	   			XlSheet.cells(1,i+1).font.color="6";
	   			XlSheet.cells(1,i+1).font.bold="true";
	   			XlSheet.cells(1,i+1).interior.colorindex="45";
			}
			
			//run over the dynamic result table and pull out the values and insert into corresponding Excel cells
			var d = 0;
			for (r=2;r<rows.length+1;r++) { // start at row 2 as we've added in headers - so also add in another row!
				for (c=1;c<columns.length+1;c++) {
					XlSheet.cells(r,c).value = data[d].innerText;
					d = d + 1;
				}
			}
			
			//autofit the columns
			XlSheet.columns.autofit;
			
			// Make visible:
			xlApp.visible = true;
			xlApp.DisplayAlerts = true;
			CollectGarbage();
			//xlApp.Quit();
		}
}
</script>
</head>
<body>
	<input type="button" value="Export To Excel" onClick="ExportToExcel()">
	<table border="1" width="100%" id="tabletoexport">
		<tr>
			<th>Month</th>
			<th>Column 1</th>
			<th>Column 2</th>
			<th>Column 3</th>
			<th>Column 4</th>
		</tr>
		<tr class="even">
			<td>January</td>
			<td>123</td>
			<td>456</td>
			<td>798</td>
			<td>123</td>
		</tr>
		<tr class="odd">
			<td>February</td>
			<td>456</td>
			<td>798</td>
			<td>123</td>
			<td>456</td>
		</tr>
		<tr  class="even">
			<td>March</td>
			<td>798</td>
			<td>123</td>
			<td>456</td>
			<td>789</td>
		</tr>
		<tr class="odd">
			<td>April</td>
			<td>123</td>
			<td>456</td>
			<td>789</td>
			<td>123</td>
		</tr>
		<tr  class="even">
			<td>May</td>
			<td>456</td>
			<td>789</td>
			<td>123</td>
			<td>456</td>
		</tr>
		<tr class="odd">
			<td>June</td>
			<td>789</td>
			<td>123</td>
			<td>456</td>
			<td>789</td>
		</tr>
		<tr class="even">
			<td>July</td>
			<td>123</td>
			<td>456</td>
			<td>789</td>
			<td>123</td>
		</tr>
		<tr class="odd">
			<td>August</td>
			<td>456</td>
			<td>789</td>
			<td>123</td>
			<td>456</td>
		</tr>
		<tr  class="even">
			<td>September</td>
			<td>789</td>
			<td>123</td>
			<td>456</td>
			<td>789</td>
		</tr>
		<tr class="odd">
			<td>October</td>
			<td>123</td>
			<td>456</td>
			<td>789</td>
			<td>123</td>
		</tr>
		<tr class="even">
			<td>November</td>
			<td>456</td>
			<td>789</td>
			<td>123</td>
			<td>456</td>
		</tr>
		<tr class="odd">
			<td>December</td>
			<td>789</td>
			<td>123</td>
			<td>456</td>
			<td>789</td>
		</tr>
	</table>
</body>
</html></textarea>
	<!-- WordPress Code Snippet -->
	<script type="text/javascript" src="http://www.yaduk.co.uk/wp-content/plugins/wordpress-code-snippet/js/shCore.js"></script><script type="text/javascript" src="http://www.yaduk.co.uk/wp-content/plugins/wordpress-code-snippet/js/shBrushXml.js"></script>
	<link type="text/css" rel="stylesheet" href="http://www.yaduk.co.uk/wp-content/plugins/wordpress-code-snippet/css/SyntaxHighlighter.css"/>
	
	<script language="javascript">
	dp.SyntaxHighlighter.ClipboardSwf = 'http://www.yaduk.co.uk/wp-content/plugins/wordpress-code-snippet/js/clipboard.swf';
	dp.SyntaxHighlighter.HighlightAll('code');
	</script>
	<!-- End WordPress Code Snippet -->
	<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.yaduk.co.uk/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.yaduk.co.uk/2009/07/22/javascript-export-html-table-excel-jscript/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Export Access to Excel with Custom Headers</title>
		<link>http://www.yaduk.co.uk/2009/07/20/export-access-to-excel-with-custom-headers/</link>
		<comments>http://www.yaduk.co.uk/2009/07/20/export-access-to-excel-with-custom-headers/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 11:26:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Reference]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[excel]]></category>

		<guid isPermaLink="false">http://www.yaduk.co.uk/?p=359</guid>
		<description><![CDATA[<p>Have you noticed how the &#8220;out the box&#8221; solution to export your dataset from MS Access to MS Excel doesn&#8217;t give much room to give custom headers to your worksheet?</p>
<p>Through utlising ActiveX you can instantiate a copy of MS Excel in memory to add in your own custom headers&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>Have you noticed how the &#8220;out the box&#8221; solution to export your dataset from MS Access to MS Excel doesn&#8217;t give much room to give custom headers to your worksheet?</p>
<p>Through utlising ActiveX you can instantiate a copy of MS Excel in memory to add in your own custom headers etc. prior to exporting your MS Access dataset into the worksheet.</p>
<p>The below code example shows you how to add 5 custom headers to your sheet. Just add in your own SQL query where it is indicated.</p>
<textarea cols="40" rows="10" name="code" class="Vb">Private Sub btn_export_excel_Click()
   
    Dim mySQL, thepos, theleft, theright, test As String
    Dim i, iNumCols  As Integer
    Dim DB As DAO.Database
    Dim rs As DAO.Recordset
    
    Set DB = CurrentDb
    
    With Me.yourformname.Form.RecordsetClone
        If .RecordCount > 0 Then .MoveLast
        test = .RecordCount
    End With
    
    If test < 65535 Then
        'create output table and output
        If MsgBox("Export selected data?", vbOKCancel, "Export . . ?") = vbOK Then
            
            Dim oApp As New Excel.Application
            Dim oBook As Excel.Workbook
            Dim oSheet As Excel.Worksheet
            Dim oRange As Excel.Range
			
			mySQL = "enter in whatever youSQL query is here"
                  
            Set rs = DB.OpenRecordset(mySQL, dbOpenSnapshot)
            Set oBook = oApp.Workbooks.Add
            Set oSheet = oBook.Worksheets(1)
            
            oSheet.Cells(1, 1).Value = "HEADER 1"
            oSheet.Cells(2, 1).Value = "HEADER 2"
            oSheet.Cells(3, 1).Value = "HEADER 3"
            oSheet.Cells(4, 1).Value = "HEADER 4"
            oSheet.Cells(5, 1).Value = "HEADER 5"
            
            'Format the header
            oSheet.Cells(1, 1).Font.Bold = True
            
            With oSheet
                Set oRange = .Range("A5:AL5")
            End With
            
            With oRange
                .MergeCells = True
            End With
           
            'Add the field names in row 7
            iNumCols = rs.Fields.count
            For i = 1 To iNumCols
                oSheet.Cells(7, i).Value = rs.Fields(i - 1).Name
            Next
            
            'Add the data starting at cell A8
            oSheet.Range("A8").CopyFromRecordset rs
            
            'Format the header row as bold and autofit the columns
            With oSheet.Range("a7").Resize(1, iNumCols)
                .Font.Bold = True
                .EntireColumn.AutoFit
            End With
            oSheet.Columns("A:A").ColumnWidth = 10.14
            
            oApp.Visible = True
            oApp.UserControl = True
            
            'make sure we clean up the instantiated Excel app!!
            'oApp.Quit
            Set oApp = Nothing
            Set oBook = Nothing
            Set oSheet = Nothing
            rs.Close
            DB.Close
            
        End If
    Else
        MsgBox "Sorry - your export is larger than what can be held within Excel!" & vbCrLf & vbCrLf & " Please consider revising your dataset.", vbCritical, "Export Error"
    End If
    
End Sub</textarea>
	<!-- WordPress Code Snippet -->
	<script type="text/javascript" src="http://www.yaduk.co.uk/wp-content/plugins/wordpress-code-snippet/js/shCore.js"></script><script type="text/javascript" src="http://www.yaduk.co.uk/wp-content/plugins/wordpress-code-snippet/js/shBrushVb.js"></script>
	<link type="text/css" rel="stylesheet" href="http://www.yaduk.co.uk/wp-content/plugins/wordpress-code-snippet/css/SyntaxHighlighter.css"/>
	
	<script language="javascript">
	dp.SyntaxHighlighter.ClipboardSwf = 'http://www.yaduk.co.uk/wp-content/plugins/wordpress-code-snippet/js/clipboard.swf';
	dp.SyntaxHighlighter.HighlightAll('code');
	</script>
	<!-- End WordPress Code Snippet -->
	<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.yaduk.co.uk/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.yaduk.co.uk/2009/07/20/export-access-to-excel-with-custom-headers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Script to set IE &#8211; Internet Explorer homepage</title>
		<link>http://www.yaduk.co.uk/2009/06/30/script-to-set-ie-internet-explorer-homepage/</link>
		<comments>http://www.yaduk.co.uk/2009/06/30/script-to-set-ie-internet-explorer-homepage/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 14:48:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Reference]]></category>
		<category><![CDATA[wscript]]></category>

		<guid isPermaLink="false">http://www.yaduk.co.uk/?p=344</guid>
		<description><![CDATA[<p>Stuck in a restrictive environment where you can&#8217;t alter your homepage settings? Check out the below WSH shell script to alter your homepage in Internet Explorer via the registry:</p>
<p>Set WSHShell = WScript.CreateObject(&#8220;WScript.Shell&#8221;)<br />
&#8216; home page URL<br />
StartPage = &#8220;http://www.yaduk.co.uk&#8221;<br />
WSHShell.RegWrite &#8220;HKLM\Software\Microsoft\Internet Explorer\Main\Start Page&#8221;, StartPage<br />
WSHShell.RegWrite&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>Stuck in a restrictive environment where you can&#8217;t alter your homepage settings? Check out the below WSH shell script to alter your homepage in Internet Explorer via the registry:</p>
<p>Set WSHShell = WScript.CreateObject(&#8220;WScript.Shell&#8221;)<br />
&#8216; home page URL<br />
StartPage = &#8220;http://www.yaduk.co.uk&#8221;<br />
WSHShell.RegWrite &#8220;HKLM\Software\Microsoft\Internet Explorer\Main\Start Page&#8221;, StartPage<br />
WSHShell.RegWrite &#8220;HKCU\Software\Microsoft\Internet Explorer\Main\Start Page&#8221;, StartPage</p>
<p>Stick in a text file with the extension .vbs</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.yaduk.co.uk/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.yaduk.co.uk/2009/06/30/script-to-set-ie-internet-explorer-homepage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XHR Connector for Internet Explorer</title>
		<link>http://www.yaduk.co.uk/2009/06/24/xhr-connector-for-internet-explorer/</link>
		<comments>http://www.yaduk.co.uk/2009/06/24/xhr-connector-for-internet-explorer/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 17:38:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Reference]]></category>
		<category><![CDATA[browser]]></category>

		<guid isPermaLink="false">http://www.yaduk.co.uk/?p=339</guid>
		<description><![CDATA[<p>Below is a great code snippet to process XML dynamically through an <em>XMLHttpRequest</em> (XHR) request. From this further XSLT processing can be applied dynamically utilising Internet Explorers &#8220;fragment&#8221; transformations.</p>
/* XHR Connector */
XMLReq = function() {
	this.adapter = false;
	/*@cc_on @*/
	/*@if (@_jscript_version >= 5)
		try {
			this.adapter =<p>&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>Below is a great code snippet to process XML dynamically through an <em>XMLHttpRequest</em> (XHR) request. From this further XSLT processing can be applied dynamically utilising Internet Explorers &#8220;fragment&#8221; transformations.</p>
<textarea cols="40" rows="10" name="code" class="JScript">/* XHR Connector */
XMLReq = function() {
	this.adapter = false;
	/*@cc_on @*/
	/*@if (@_jscript_version >= 5)
		try {
			this.adapter = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				this.adapter = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (E) {
				this.adapter = false;
			}
		}
	@end @*/
	if (!this.adapter && typeof(XMLHttpRequest) != 'undefined') {
		this.adapter = new XMLHttpRequest();
	}
};
XMLReq.prototype.adapter = null;
XMLReq.prototype.getDocument = function(sUrl) {
	this.adapter.open("GET", sUrl, false);
	this.adapter.send(null);
	//alert("Status = " + this.adapter.status + "n"+this.adapter.getAllResponseHeaders()+"nParse Error = " +this.adapter.responseXML.parseError.errorCode);
	// if XML sent as application/octet-stream!! you can't use responseXML in this instance instead must use responseBody
	return this.adapter.responseBody;
};

/*  The actual  */
var yourprocessorfunction = function() {};
var nameofcallvariable = new yourprocessorfunction();
yourprocessorfunction.prototype.data = null;
yourprocessorfunction.prototype.init = function() {
	// init vars
	this.data = this.XMLReq.getDocument("http://whereeveryourxmldocis");
};
/* Init */
function start() {
	nameofcallvariable.init();
}
window.onload = start;</textarea>
	<!-- WordPress Code Snippet -->
	<script type="text/javascript" src="http://www.yaduk.co.uk/wp-content/plugins/wordpress-code-snippet/js/shCore.js"></script><script type="text/javascript" src="http://www.yaduk.co.uk/wp-content/plugins/wordpress-code-snippet/js/shBrushJScript.js"></script>
	<link type="text/css" rel="stylesheet" href="http://www.yaduk.co.uk/wp-content/plugins/wordpress-code-snippet/css/SyntaxHighlighter.css"/>
	
	<script language="javascript">
	dp.SyntaxHighlighter.ClipboardSwf = 'http://www.yaduk.co.uk/wp-content/plugins/wordpress-code-snippet/js/clipboard.swf';
	dp.SyntaxHighlighter.HighlightAll('code');
	</script>
	<!-- End WordPress Code Snippet -->
	<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.yaduk.co.uk/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.yaduk.co.uk/2009/06/24/xhr-connector-for-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Excel Split Firstname Lastname 2 Columns</title>
		<link>http://www.yaduk.co.uk/2009/05/26/excel-split-firstname-lastname-2-columns/</link>
		<comments>http://www.yaduk.co.uk/2009/05/26/excel-split-firstname-lastname-2-columns/#comments</comments>
		<pubDate>Tue, 26 May 2009 13:00:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Reference]]></category>
		<category><![CDATA[excel]]></category>

		<guid isPermaLink="false">http://www.yaduk.co.uk/?p=314</guid>
		<description><![CDATA[<p>Excellent post in the MSDN microsoft.public.excel.programming community regarding the splitting of a firstname and lastname into two seperate columns.  The honours go to someone called &#8220;Bam&#8221;.</p>
<p>Last Name<br />
=IF(ISERROR(LEFT(B2,FIND(&#8220;,&#8221;,B2,1)-1)),RIGHT(B2,LEN(B2)-(FIND(&#8221; &#8220;,B2,1))),LEFT(B2,FIND(&#8220;,&#8221;,B2,1)-1))</p>
<p>First Name<br />
=IF(ISERROR(RIGHT(B1,LEN(B1)-(FIND(&#8220;,&#8221;,B1,1)+1))),LEFT(B1,FIND(&#8221; &#8220;,B1,1)+1-1),RIGHT(B1,LEN(B1)-(FIND(&#8220;,&#8221;,B1,1)+1)))</p>
]]></description>
			<content:encoded><![CDATA[<p>Excellent post in the MSDN microsoft.public.excel.programming community regarding the splitting of a firstname and lastname into two seperate columns.  The honours go to someone called &#8220;Bam&#8221;.</p>
<p>Last Name<br />
=IF(ISERROR(LEFT(B2,FIND(&#8220;,&#8221;,B2,1)-1)),RIGHT(B2,LEN(B2)-(FIND(&#8221; &#8220;,B2,1))),LEFT(B2,FIND(&#8220;,&#8221;,B2,1)-1))</p>
<p>First Name<br />
=IF(ISERROR(RIGHT(B1,LEN(B1)-(FIND(&#8220;,&#8221;,B1,1)+1))),LEFT(B1,FIND(&#8221; &#8220;,B1,1)+1-1),RIGHT(B1,LEN(B1)-(FIND(&#8220;,&#8221;,B1,1)+1)))</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.yaduk.co.uk/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.yaduk.co.uk/2009/05/26/excel-split-firstname-lastname-2-columns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
