Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default How to export excel sheet to CSV

The following works in Excel 2003 and is a macro, but it should help.

Sub SaveSheetToFile()
str1 = ThisWorkbook.Name
Workbooks(str1).ActiveSheet.Cells.Select
Selection.Copy
str2 = InputBox("Enter folder name. e.g. c:\MyFiles\")
str3 = InputBox("Enter file name. e.g. Book1")
Workbooks.Add
ActiveSheet.Paste
ActiveWorkbook.SaveAs Filename:=str2 & str3 & ".csv", FileFormat:=
_
xlCSVMSDOS, CreateBackup:=False
ActiveWorkbook.Close True
End Sub

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Export to Excel with different sheet names Ananth Excel Programming 0 September 24th 08 06:49 PM
export excel sheet to visio S N Excel Discussion (Misc queries) 1 October 31st 07 07:35 AM
export excel data to another sheet owl527[_19_] Excel Programming 3 January 10th 06 11:22 AM
How do I export excel spread sheet to my Palm T3? loki Excel Discussion (Misc queries) 1 February 14th 05 08:21 PM
Export Excel Sheet to JPG or TIF quartz[_2_] Excel Programming 3 January 7th 05 09:41 PM


All times are GMT +1. The time now is 10:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"