Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Using XL 2000
Cell A1 in my worksheet contains concatenated data. There will be upto 200 rows. I'm looking for a code solution that would loop through each cell in the range (A1:A100), collect and save the content, line by line in a text file on my local drive. Each time the macro was executed, The new data would overwrite the existing file. If possible, any ideas appreciated. Many thanks Paul |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Activesheet.copy
ActiveSheet.Rows(101).Resize(65536-100).EntireRow.Delete Range("A1:A100").Formula = Range("A1:A100").Value Columns(2).Resize(,255).Delete On Error Resume Next kill "C:\MyData\Myfile.Txt" On Error goto 0 ActiveWorkbook.SaveAs "C:\MyData\Myfile.txt", FileFormat:=xlText ActiveWorkbook.Close SaveChanges:=False -- Regards, Tom Ogilvy "Paul" wrote in message ... Using XL 2000 Cell A1 in my worksheet contains concatenated data. There will be upto 200 rows. I'm looking for a code solution that would loop through each cell in the range (A1:A100), collect and save the content, line by line in a text file on my local drive. Each time the macro was executed, The new data would overwrite the existing file. If possible, any ideas appreciated. Many thanks Paul |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you Tom.
Your solutions, as usual, are perfect! Paul -----Original Message----- Activesheet.copy ActiveSheet.Rows(101).Resize(65536-100).EntireRow.Delete Range("A1:A100").Formula = Range("A1:A100").Value Columns(2).Resize(,255).Delete On Error Resume Next kill "C:\MyData\Myfile.Txt" On Error goto 0 ActiveWorkbook.SaveAs "C:\MyData\Myfile.txt", FileFormat:=xlText ActiveWorkbook.Close SaveChanges:=False -- Regards, Tom Ogilvy "Paul" wrote in message ... Using XL 2000 Cell A1 in my worksheet contains concatenated data. There will be upto 200 rows. I'm looking for a code solution that would loop through each cell in the range (A1:A100), collect and save the content, line by line in a text file on my local drive. Each time the macro was executed, The new data would overwrite the existing file. If possible, any ideas appreciated. Many thanks Paul . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
finding text within a document externally, not internally | Excel Discussion (Misc queries) | |||
Cell content surrounded by quotes when saving as tab delimited for | New Users to Excel | |||
Remove content when saving / loading spreadsheet | Excel Worksheet Functions | |||
How do I preserve cell content when saving an excel file in csv | Excel Discussion (Misc queries) | |||
problem with selection when calling macro externally from VB6 | Excel Programming |