General discussion

Locked

Excel Rows to Text File (Complex)

By EG1080 ·
I have a spreadsheet with 200+ employee details (Name, Job Title, Phone Numbers, etc). Each user is setup along the rows, so that each column is the field I need to use. I want to create a text file using each rows information. This is basically for a digital signature file. There are too many users to create this individually.

However, I don't want the rows to just export into a CSV file, I want the rows to be saved into individual files with preset templated information between each field. For example -

John Doe, Salesperson, 555-0000, USA Branch

Into -

Regards,

John Doe
Salesperson
Tel: 555-0000
ExampleCompany.com, USA Branch

I know there are ways to export the row to a CSV but can I automatically populate the extra information (like above) into a text file? Macro or VB? Mind you I have minimal VB and programming skills but if you could set me on the right path I would be most appreciative.

Also (I'm asking a lot), can I name each file as the name of the employee? So that the file above becomes JohnDoe.txt (or close to) and every file after follows the same convention.

If I changed the excel spreadsheet into another format would that help? Please help me as this responsibility, given to me by the company is going to kill me if I can't automate it.

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Excel to .txt

by Brabi In reply to Excel Rows to Text File ( ...

That shouldn't be too difficult with some VB scripting, will try to kludge something when I get home from work. It may be even easier to import the xls into access and do the necessary there - is using access a possibility?

Collapse -

RE:

by EG1080 In reply to Excel to .txt

Shouldn't be a problem getting them into Access. I think what I need is kind of like the following -

RowCount=1, ColumnCount=1
"Regards"
RowCount.ColumnCount
RowCount.ColumnCount+1
"Tel: " RowCount.ColumnCount+2
RowCount.ColumnCount+3 ", " RowCount.ColumnCount+4
PrintToFileName=RowCount.ColumnCount.txt
RowCount=RowCount+1, ColumnCount=1
Loop

I don't know if that makes sense, I'm sort of just guessing. I can see what needs to be done in my head but I dont know how to get it done.

Back to Software Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums