From the course: Excel VBA: Managing Files and Data

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Save a workbook as a CSV file

Save a workbook as a CSV file - Microsoft Excel Tutorial

From the course: Excel VBA: Managing Files and Data

Start my 1-month free trial

Save a workbook as a CSV file

- Excel is a very common file format. However, it can't interact with every other program. In some cases, you might need to save your data in what's called a comma separated value or a CSV file. In this movie, I will show you how to use Excel VBA to write your data to a comma separated value file. My sample file is oh two oh seven, save as CSV. And that's a macro enabled workbook that you can find in the chapter two folder of the exercise files collection. This workbooks worksheet contains some data, and I'd like to save the workbook as a comma separated value file. To do that, I will press alt F11 to move to the visual basic editor. And here you see that I have a code module all ready to go, and I have a couple of lines of code that are commented out. I'll get to those in a moment. The first thing I'll do is to save this workbook as a CSV file or a comma separated value. The code to do that, which I'll put between my two…

Contents