<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?>

<feed xmlns="http://purl.org/atom/ns#" version="0.3" xml:lang="en-AU">
<link href="https://www.blogger.com/atom/18978988" rel="service.post" title="DevBlog: Daniel" type="application/atom+xml"/>
<link href="https://www.blogger.com/atom/18978988" rel="service.feed" title="DevBlog: Daniel" type="application/atom+xml"/>
<title mode="escaped" type="text/html">DevBlog: Daniel</title>
<tagline mode="escaped" type="text/html">JavaScript, XML, and computery stuff.  Check out &lt;a href="http://danielbaird.com"&gt;danielbaird.com&lt;/a&gt; for other stuff I do.</tagline>
<link href="http://danielbaird.com/devblog/" rel="alternate" title="DevBlog: Daniel" type="text/html"/>
<id>tag:blogger.com,1999:blog-18978988</id>
<modified>2006-03-07T00:51:47Z</modified>
<generator url="http://www.blogger.com/" version="5.15">Blogger</generator>
<info mode="xml" type="text/html">
<div xmlns="http://www.w3.org/1999/xhtml">This is an Atom formatted XML site feed. It is intended to be viewed in a Newsreader or syndicated to another site. Please visit the <a href="http://help.blogger.com/bin/answer.py?answer=697">Blogger Help</a> for more info.</div>
</info>
<convertLineBreaks xmlns="http://www.blogger.com/atom/ns#">false</convertLineBreaks>
<entry xmlns="http://purl.org/atom/ns#">
<link href="https://www.blogger.com/atom/18978988/114169222561857545" rel="service.edit" title="Excel: That annoying paintbrush button (a.k.a. &quot;Insert Options&quot;)" type="application/atom+xml"/>
<author>
<name>Daniel</name>
</author>
<issued>2006-03-07T10:00:00+10:00</issued>
<modified>2006-03-07T00:48:55Z</modified>
<created>2006-03-07T00:43:45Z</created>
<link href="http://danielbaird.com/devblog/2006/03/excel-that-annoying-paintbrush-button.html" rel="alternate" title="Excel: That annoying paintbrush button (a.k.a. &quot;Insert Options&quot;)" type="text/html"/>
<id>tag:blogger.com,1999:blog-18978988.post-114169222561857545</id>
<title mode="escaped" type="text/html">Excel: That annoying paintbrush button (a.k.a. "Insert Options")</title>
<content type="application/xhtml+xml" xml:base="http://danielbaird.com/devblog/" xml:space="preserve">
<div xmlns="http://www.w3.org/1999/xhtml">Someone asked me how to get rid of the "Insert Options" button.  Here's what he was getting; I've highlighted the button in this image:

<img alt="" border="0" src="http://danielbaird.com/media/devblog/excel-insert-options-button.gif" style="margin: 0pt 0pt 10px 10px; cursor: pointer; display: block"/>
You get this when you insert a row.  Excel is asking what formatting you want for your new row (you can choose to copy formatting from the row above or the row below).  Even when you make a choice, however, the button <span style="font-style: italic;">stays on screen</span>, forever obscuring nearby data (you can click in another cell and the buttons stays there -- to get rid  of it you have to actually <span style="font-style: italic;">edit</span> a cell).

So, here's how to get rid of it:
<ol>
<li>In the <span style="font-weight: bold;">Tools</span> menu,  choose <span style="font-weight: bold;">Options</span>.</li>
<li>Select the <span style="font-weight: bold;">Edit</span> tab.</li>
<li>Un-check the box next to "<span style="font-weight: bold;">Show Insert Options buttons</span>".</li>
</ol>That's it  -- you're free of the Insert Options buttoon forever (until you re-install Excel).</div>
</content>
<draft xmlns="http://purl.org/atom-blog/ns#">false</draft>
</entry>
<entry xmlns="http://purl.org/atom/ns#">
<link href="https://www.blogger.com/atom/18978988/113202913223932257" rel="service.edit" title="XSLT: Padding text output to the right width" type="application/atom+xml"/>
<author>
<name>Daniel</name>
</author>
<issued>2005-11-15T14:27:00+10:00</issued>
<modified>2005-11-18T04:41:52Z</modified>
<created>2005-11-15T04:32:12Z</created>
<link href="http://danielbaird.com/devblog/2005/11/xslt-padding-text-output-to-right.html" rel="alternate" title="XSLT: Padding text output to the right width" type="text/html"/>
<id>tag:blogger.com,1999:blog-18978988.post-113202913223932257</id>
<title mode="escaped" type="text/html">XSLT: Padding text output to the right width</title>
<content type="application/xhtml+xml" xml:base="http://danielbaird.com/devblog/" xml:space="preserve">
<div xmlns="http://www.w3.org/1999/xhtml">I'm writing some XSLT that is supposed to generate a text file.
I thought I needed to pad the fields with spaces to get them to the right width, but actually I don't, it is delimited text not fixed width.<br/>
<br/>
Thought I better post this somewhere I can find it again if I need to :)<br/>
<br/>
<textarea class="xml:nogutter:nocontrols" cols="60" name="code" rows="31" wrap="off">
&lt;!-- this is the function for making a field the right width --&gt;
&lt;xsl:template name="leftjustify"&gt;
  &lt;xsl:param name="content"&gt;
  &lt;xsl:param name="width"&gt;

  &lt;xsl:choose&gt;
      &lt;xsl:when test="string-length($content) &amp;gt; $width"&gt;
          &lt;xsl:value-of select="substring($content,1,$width)"&gt;
      &lt;/xsl:when&gt;

      &lt;xsl:otherwise&gt;
          &lt;xsl:value-of select="$content"&gt;
          &lt;xsl:call-template name="spaces"&gt;
              &lt;xsl:with-param name="length"&gt;&lt;xsl:value-of select="$width - string-length($content)"&gt;&lt;/xsl:with-param&gt;
          &lt;/xsl:call-template&gt;
      &lt;/xsl:otherwise&gt;

  &lt;/xsl:choose&gt;

&lt;/xsl:template&gt;

&lt;xsl:template name="spaces"&gt;
  &lt;xsl:param name="length"&gt;
  &lt;!-- the value of this next variable is 255 spaces.. --&gt;
  &lt;xsl:variable name="longstringofspaces"&gt;&lt;xsl:text&gt;                                                                                                                                                                                                                                                               &lt;/xsl:text&gt;&lt;/xsl:variable&gt;
  &lt;xsl:value-of select="substring($longstringofspaces,1,$length)"&gt;
&lt;/xsl:template&gt;
</textarea>
<br/>
<br/>
There's two named templates (read, functions), "spaces" that returns a specified number of spaces (up to 255), and one that uses spaces to do truncation or left-justification.  Call it like this:<br/>
<br/>
<textarea class="xml:nogutter:nocontrols" cols="60" name="code" rows="5" wrap="off">
&lt;xsl:call-template name="leftjustify"&gt;
    &lt;xsl:with-param name="content"&gt;this is too short&lt;/xsl:with-param&gt;
    &lt;xsl:with-param name="width"&gt;40&lt;/xsl:with-param&gt;
&lt;/xsl:call-template&gt;
</textarea>
<br/>
<br/>
and the result will be the text "this is too short" with 23 spaces after it (making it 40 chars long).</div>
</content>
<draft xmlns="http://purl.org/atom-blog/ns#">false</draft>
</entry>
</feed>
