CSV Templates

The Add method of the Workbooks object exhibits some behavior that’s new to me. Normally when you supply the Template argument, you get a copy of the template with a “1? appended to the name. For instance,

Workbooks.Add “Sales.xls”

opens a workbook named Sales1.

However, this code

Workbooks.Add “Sales.csv”

Opens the CSV as read-only.

That’s not how I expected it to work. I was perfectly happy making a copy of the CSV file, but opening it as read-only is actually a better way for what I wanted to do. I didn’t see this behavior documented in the 2003 help files, but “good work” to the MS programmer for anticipating my needs when I didn’t even know them. If I really did want a copy, then I’d be pissed.

Posted in Uncategorized

One thought on “CSV Templates

  1. I’d always assumed that the template argument had to refer to an xlt file, but now I see that’s not the case.

Leave a Reply

Your email address will not be published. Required fields are marked *