Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - Create text file named after a cell containing other cell data

Status
Not open for further replies.

gmoorthy

Programmer
Jul 13, 2004
107
US
I'm looking to create a .txt file for each value in column A containing the corresponding values in columns B
 
Hi,

Care to explain what that means?

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 


COlumn A Column B

City NewYork
Country USA




From these two columns I want to create a text file which will be called as City.txt and the data inside City.txt should be NewYork.

So basically a text file name which is in Cell A1 and the data inside that comes from Cell B1.
 
A text file with one record?

What's the business case for this?

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
This is a sample data actually the cell B1 contains something like this:

</XML/ABC/Date/........>

So i have a long list of rows and i have to convert each row to the appropriate text file containing the relavant data.
 
You need to google "what is a business case" and then report back with a statement of yours.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
I thought what i explained was simple:

From two excel coloumns i was to create a text file which will be called by what the value is in cell A1 and contain the data from cell B2. I have about 2000 rows so i need to create 2000 .txt files.
 
A business case captures the reasoning for initiating a project or task."
From Wikipedia, the free encyclopedia

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
These individual txt files have to be put in a queue for processing .
 
So various other processes will open these individual files, based on what?

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
They will just open these files and try to process and if there is an error in processing this file the other process will write to a log file saying filename.txt was not processed. So this way i can know which files got processed and which did not.
 
So why could that not happen processing the list of data, rather than files of data? Seems rather round about.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Unfortunately that is how it is . So is there a way to create these txt files whichcould be in some local directory C:\jobs and then i can just pick all these files and move it to a queue so that it can start processing ?
 
Well we finally got to the bottom line.

This will be a VBA process. Loop thru the list, opening an input file, write a record close the file, next.

If you need help with your code, please post a thread in forun707.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Thanks a lot for that link. I have another issue here

I have two spreadsheet

Spreadsheet (1) has 2 columns

ColumnA Column B

YYYYMMDD Name1
YYYYMMDD Name2


In Another Spreadsheet i have

Column A Column B

Name1 </XML</job>date=YYYYMMDD>/job>
Name2 </XML</job>date=YYYYMMDD>/job>


In Spreadsheet 2 i want to update the YYYMMDD with values from Spreadsheet 1 if the Names match
 
Use Data > text to columns to parse out the data you want. The data you don't need can be ignored and not returned. This must be done on the column prior to your lookup.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top