How to create .csv file

V

Vinod

Hi All,

I've a requirement to save selected sheet as .csv file through macro.

The macro I designed is able to create new excel file with selected sheet.
while saving I'm giving as

gwbk.save "C:\Test\test.csv", Format:=XlNormal

I'm getting test.csv but I'm not able to open test.csv file to see comma
seperated values in note pad.

Can any one help meout how to create .csv file which can be opened in
notepad? Any help would be appreciated.

Note: The macro code should work in excel-2003 & 2007 environment.

Advanced Thanks,
~Vins
 
G

Gord Dibben

gwbk.SaveAs Filename:= _
"C:\Test\test.csv", FileFormat:=xlCSV


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top