<?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>Adventures in Keyframes and Code &#187; VBA</title>
	<atom:link href="http://www.keyframesandcode.com/code/category/development/vba/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.keyframesandcode.com/code</link>
	<description>MaxScript, ActionScript, PHP &#38; JavaScript</description>
	<lastBuildDate>Wed, 06 Oct 2010 23:49:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Excel export delimited text macro</title>
		<link>http://www.keyframesandcode.com/code/development/excel-export-tab-delimited-text-macro/</link>
		<comments>http://www.keyframesandcode.com/code/development/excel-export-tab-delimited-text-macro/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 12:05:32 +0000</pubDate>
		<dc:creator>Dave Stewart</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[VBA]]></category>

		<guid isPermaLink="false">http://www.keyframesandcode.com/code/?p=252</guid>
		<description><![CDATA[I often need to save text from Excel to use with PHP, but I find Excel&#8217;s &#8220;Save As&#8221; functionality less that useful, as it converts your open worksheet to a text, which is a real pain.
This macro exports the current worksheet as a tab-delimited or comma-delimited text file, with the following features:

optionally exports the current [...]]]></description>
			<content:encoded><![CDATA[<p>I often need to save text from Excel to use with PHP, but I find Excel&#8217;s &#8220;Save As&#8221; functionality less that useful, as it converts your open worksheet to a text, which is a real pain.</p>
<p>This macro exports the current worksheet as a tab-delimited or comma-delimited text file, with the following features:</p>
<ul>
<li>optionally exports the current selection</li>
<li>outputs values as text</li>
<li>strips leading and trailing whitespace</li>
<li>quotes any cells with spaces (TSV only)</li>
<li>warns if the file is locked</li>
</ul>
<p>Here&#8217;s an example of the two file outputs:</p>
<p><b>Tab-separated values</b></p>
<pre>
id	word	words
1	hello	"hello there"
2	goodbye	"goodbye then"
3	a	"a, b, c"
</pre>
<p><b>Comma-separated values</b></p>
<pre>
id,word,words
1,hello,hello there
2,goodbye,goodby then
3,a,a, b, c
</pre>
<p><a href="http://www.keyframesandcode.com/resources/vba/Excel/ExportDelimitedText.zip">Download ExportDelimitedText</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.keyframesandcode.com/code/development/excel-export-tab-delimited-text-macro/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MindManager Web Site Creator</title>
		<link>http://www.keyframesandcode.com/code/development/mindmanager-web-site-creator/</link>
		<comments>http://www.keyframesandcode.com/code/development/mindmanager-web-site-creator/#comments</comments>
		<pubDate>Mon, 11 Jun 2007 00:00:14 +0000</pubDate>
		<dc:creator>Dave Stewart</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[VBA]]></category>

		<guid isPermaLink="false">http://www.keyframesandcode.com/code/development/mindmanager-web-site-creator/</guid>
		<description><![CDATA[Mindjet Mind Manager is an awesome tool for mind mapping, note-taking, planning and organising. I use it often these days in place of Word to flesh-out complex hierarchical ideas quickly and easily, with the most freedom from any package I&#8217;ve ever used ever!
If you don&#8217;t know what mind mapping is &#8211; remember those spider diagrams [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mindjet.com/uk/">Mindjet Mind Manager</a> is an awesome tool for mind mapping, note-taking, planning and organising. I use it often these days in place of Word to flesh-out complex hierarchical ideas quickly and easily, with the most freedom from any package I&#8217;ve ever used <em>ever!</em></p>
<p>If you don&#8217;t know what mind mapping is &#8211; remember those spider diagrams you used to make at school? Same thing. Only once it&#8217;s on computer with drag and drop, linking, formatting, full text-insertion, it&#8217;s like spider diagrams on acid (in a good way!)</p>
<p><img src="http://www.keyframesandcode.com/resources/vba/MindManager/map.gif" /></p>
<h3>From mind map to HTML</h3>
<p>So, you&#8217;ve got MindManager. You&#8217;re using it to create these amazing mind maps, or web site maps, or anything you like really. But what then? It&#8217;s all very well having these wonderful maps in MindManager, but what I wanted was some way to<br />
get what I saw on the screen&#8230;</p>
<p><img src="http://www.keyframesandcode.com/resources/vba/MindManager/screenshot.gif" /></p>
<p>&#8230; onto my hard disk.</p>
<p>Unfortunately, the built-in MindManager site export is shit. Utter, utter, shit. It&#8217;s so bad I can&#8217;t even begin to describe how shit it is.</p>
<p>However, one of the best things about MindManager is that its <em>fully</em> scriptable through VBA. The documentation is sadly lacking in concrete examples, but once you manage to hack your way through and get used to the MindManager DOM, it&#8217;s an incredibly powerful tool and you can do pretty much anything you want.</p>
<h3>VBA</h3>
<p>Enter the wonderful *cough* bullshit *cough-cough* world of VBA.</p>
<p>Now, VBA is not my favourite language in the world for a few reasons (it&#8217;s a bit old now), however I really like Microsoft&#8217;s IDE, and the fact I can leverage Office apps or anything else that&#8217;s VBA-enabled makes the pain more than bearable. Hell I sometimes even enjoy it!</p>
<p>So, the plan was to create an exporter that would recursively trawl my map, and spit out files in the same structure on my hard disk. To add to this, I wanted the script to:</p>
<ul>
<li>Give me some control over which nodes became directories, folders, and page sections or headings</li>
<li>Use a templating system that would provide a flexible base HTML and CSS framework</li>
<li>Build the top and sub-navigation blocks, complete with ids, rollover and down states</li>
<li>Convert any text on nodes to body HTML copy</li>
<li>Insert the correct page titles</li>
<li>Do it all quickly and seamlessly!</li>
</ul>
<p>I think in the end it took about a week to get to version 1.0, and ended up at about 1000 lines of code.</p>
<p>Here&#8217;s the list of procedures I ended up with:</p>
<p><img src="http://www.keyframesandcode.com/resources/vba/MindManager/procedures.gif" /></p>
<h3>The end result&#8230;</h3>
<p>So&#8230; what does the final export look like!?</p>
<p>Well, I built a site for a friend recently who didn&#8217;t have a massive budget, so this was the perfect choice. The site has about 20 pages, and it takes about 1.5 seconds to generate all the files and folders for the complete site.</p>
<table border="0" cellpadding="0" cellspacing="0" width="625" style="margin-bottom:20px">
<tr>
<td><a href="http://www.keyframesandcode.com/resources/vba/MindManager/fff/html/home/welcome.html" class="plain" target="_blank"><img src="http://www.keyframesandcode.com/resources/vba/MindManager/site-01.gif" border="0" /></a></td>
<td width="50">&nbsp;</td>
<td><a href="http://www.funkyfitfirm.co.uk" class="plain" target="_blank"><img src="http://www.keyframesandcode.com/resources/vba/MindManager/site-02.gif" border="0" /></a></td>
</tr>
<tr>
<td style="padding-top: 10px" align="center" valign="top"><a href="http://www.keyframesandcode.com/resources/vba/MindManager/fff/html/home/welcome.html" target="_blank">Here&#8217;s the base site</a> export from MindManager</td>
<td valign="top">&nbsp;</td>
<td style="padding-top: 10px" align="center" valign="top">And <a href="http://www.funkyfitfirm.co.uk" target="_blank">here&#8217;s the final site</a> after images and the final style sheets have been developed</td>
</tr>
</table>
<p>The key thing to notice here is that the base HTML for both pages is <em>exactly</em> the same! The only thing that has been added to the final site are the images, and updated CSS.</p>
<h3>Benefits of this approach</h3>
<p>Firstly, using MindManager for any organisational task is a must for me these days. I really can&#8217;t live without it.</p>
<p>From a client perspective, it allows me to get all their Word-formatted text straight into an hierarchical system, which can then be dragged and dropped to create far better site maps than they originally come up with. The whole process of editing text, dragging nodes and seeing the results is so hands-on; it&#8217;s amazing.</p>
<p>Secondly, by being able to export the map with literally a couple of key-presses we&#8217;re able to see within seconds exactly how the finished site will work, and then edit, re-edit, and re-re-edit as much as we like.</p>
<p>For small sites (less than 20 pages) where static HTML pages are preferable to a CMS, the process is incredible. Using MindManager and custom scripting has allowed me to:</p>
<ul>
<li>Collaborate with clients far more easily by quickly generating workable sites for review</li>
<li>Streamline the initial design documentation process for a site by including all copy within one file / application</li>
<li>Rely upon a tried and tested HTML/CSS layout and navigation framework</li>
<li>Minimize development (and-redevelopment) time for page-generation</li>
<li>Spend less time coding laborious CSS and HTML and more time doing interesting stuff</li>
</ul>
<h3>Download</h3>
<p>This application is not available for download, but to get in contact with me for any development work, please see the link at the top of the page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.keyframesandcode.com/code/development/mindmanager-web-site-creator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

