View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Importing text files into a "cached" worksheet?

Do you really mean delete a worksheet?

application.displayalerts = false
'your code to delete the worksheet
application.displayalerts = true

Or did you mean that you want to close the file without being prompted:

someworkbookvariablehere.close savechanges:=false



Zilla wrote:

On Jan 15, 2:44 pm, Dave Peterson wrote:
You could combine the .csv files into one and then import just one file.http://www.rondebruin.nl/csv.htm
(from Ron de Bruin's site)

But you could just open the .csv (as a new workbook), copy the data and paste to
your worksheet, then close the .csv file. Repeat another four times.

Ron has some other code that uses data|import external data:http://www.rondebruin.nl/txtcsv.htm

Zilla wrote:

I have read lots of good info in the NG on how to import CSV files
into current workbook, worksheet etc. With these methods, if I import
5 files for example, I'll end up with 5+1=6 sheets, the 5 imported
files plus the original sheet.


However, I want to import the files, do something with the data in all
of them, and put the final data into the ONE sheet, so my workbook
ends up with this ONE sheet. Besides creating the worksheets and then
deleting them later, can I just "cache" them? Thanks.


--

Dave Peterson


Ok thanks! I implemented a routine that just deletes the worksheet,
but how can I disable the prompt that asks if I want to delete it or
not?


--

Dave Peterson