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

I'm a newbie with writing Excel Macros. Basically, what I am trying to do
is convert a workbook with multiple sheets into a single CSV file. I've
got the macro to activate each sheet one at a time and save it as .csv and
then after the last save it saves the workbook again in the normal workbook
format. However, the problem is, is that I have 30 .csv files and I don't
want to have to concatenate them all on the UNIX side. Is there a way to
merge these on the fly as I am saving them in csv format?

Thanks so much for your help.

Matt
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default Excel CSV format

If those are the only .csv files in the folder, you could shell to DOS and then
issue a couple of old commands to combine them and clean up:

Windows start button|Run
cmd (win2k or winXP)
command (win98)

Get to that folder

copy *.csv all.txt
del *.csv
ren all.txt all.csv

exit
to get back to windows.



Big Daddy wrote:

I'm a newbie with writing Excel Macros. Basically, what I am trying to do
is convert a workbook with multiple sheets into a single CSV file. I've
got the macro to activate each sheet one at a time and save it as .csv and
then after the last save it saves the workbook again in the normal workbook
format. However, the problem is, is that I have 30 .csv files and I don't
want to have to concatenate them all on the UNIX side. Is there a way to
merge these on the fly as I am saving them in csv format?

Thanks so much for your help.

Matt


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel CSV format

Chip Pearson has code to show how to write a CSV file using Low level file
output. You would just adjust the code to open the file once, then loop
through your sheets and write the file

http://www.cpearson.com/excel/imptext.htm import/export text files

an alternative would be to copy all your data to a single sheet workbook and
then save as CSV. Again, this could easily be done with a macro.

or you could concatenate them on the Windows side with the DOS copy command

Copy a.txt+b.txt+c.txt all.txt

using the shell command. But I think one of the previous solutions would
be better.

--
Regards,
Tom Ogilvy

"Big Daddy" wrote in message
.. .
I'm a newbie with writing Excel Macros. Basically, what I am trying to do
is convert a workbook with multiple sheets into a single CSV file. I've
got the macro to activate each sheet one at a time and save it as .csv and
then after the last save it saves the workbook again in the normal

workbook
format. However, the problem is, is that I have 30 .csv files and I don't
want to have to concatenate them all on the UNIX side. Is there a way to
merge these on the fly as I am saving them in csv format?

Thanks so much for your help.

Matt



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
Excel Format Problem - Date Overrides Format Mary Excel Discussion (Misc queries) 5 February 10th 10 05:49 AM
Excel 2003. Custom format gets replaced by Special format. jasper New Users to Excel 0 September 1st 08 03:46 AM
Convert Excel 2007 format (*.xlsx) into Excel 2003 format JD Moss Excel Discussion (Misc queries) 2 September 27th 07 06:46 PM
How to covert picture excel format to editable excel format SANJUZ Excel Discussion (Misc queries) 1 January 8th 06 09:27 PM
how to format excel format to text format with separator "|" in s. azlan New Users to Excel 1 January 31st 05 12:57 PM


All times are GMT +1. The time now is 04:25 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"