<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Jason's Weblog: Convert Excel to CSV</title>
    <link>http://www.jasongarber.com/articles/2007/06/23/convert-excel-to-csv</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>Convert Excel to CSV</title>
      <description>&lt;p&gt;A little Applescript to batch convert xls files to csv:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
set theFolder to choose folder with prompt "Choose the folder that contains your Excel files" 
tell application "Finder" to set theFiles to (files of theFolder)
set fileCount to count theFiles
repeat with i from 1 to fileCount
    set fName to text 1 thru -5 of ((name of item i of theFiles) as text)
    if ((name of item i of theFiles) as text) ends with ".xls" then
        set tName to (theFolder as text) &amp;#38; fName &amp;#38; ".csv" 
        tell application "Microsoft Excel" 
            activate
            open (item i of theFiles) as text
            save fName in tName as CSV
            close active workbook without saving
        end tell
    end if
end repeat
&lt;/code&gt;
&lt;/pre&gt;</description>
      <pubDate>Sat, 23 Jun 2007 06:19:00 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:1bd38868-858e-45c3-a497-c5d17c42717b</guid>
      <author>Jason Garber</author>
      <link>http://www.jasongarber.com/articles/2007/06/23/convert-excel-to-csv</link>
      <category>OS X</category>
    </item>
  </channel>
</rss>
