<?xml version="1.0" encoding="windows-1252"?>
<node id="628896" title="Use The Macro Recorder, Luke (Re: Using Win32::OLE and Excel - Tips and Tricks)" created="2007-07-26 07:20:48" updated="2007-07-26 03:20:48">
<type id="11">
note</type>
<author id="5348">
Corion</author>
<data>
<field name="doctext">
&lt;p&gt;In addition to this very good introduction, here's my approach to automating things in Excel that I know how to do manually in Excel. These steps apply to any (Office) application that has a macro recorder:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Start the Excel Macro Recorder&lt;/li&gt;
&lt;li&gt;Perform the desired action(s) manually, for example, delete a row or bolden text or create a pivot chart&lt;/li&gt;
&lt;li&gt;Stop the Excel Macro Recorder&lt;/li&gt;
&lt;li&gt;Inspect the generated VB code&lt;/li&gt;
&lt;li&gt;Check that the generated VB code does what you want&lt;/li&gt;
&lt;li&gt;Translate the generated VB code to Perl / Win32::OLE invocations&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;That's all there is to it and it sure beats poring over the documentation to find out the needed function names.&lt;/p&gt;
&lt;p&gt;Similar lists exist at [id://497508] and [id://310200], but as this appears to be a good starting page for people working with Win32::OLE, I figured to put it here as well.&lt;/p&gt;</field>
<field name="root_node">
153486</field>
<field name="parent_node">
153486</field>
</data>
</node>
