General discussion

Locked

Excel and "&-Text"

By rdu1961 ·
1) I want to take a basic "&-delimited" text
file into Excel. At this point, I have
three colums of data. I have to manually
manuever the column widths and assign
the Text Fonts to the Column Headings.

2) This "&-delimited" text file will always
have the same column headings, the same
column widths, and the same Fonts, etc.

Question:
Can I slurp up this "&-delimted" text file (yes I can, no problem) and then hit some kind of Excel macro thing that will automatically zap my file into the formats that I do manually?

In other words, after I get this basic file into Excel, is there some easy way to automatically put it into the column widths, etc that I have somehow previously specified?

This conversation is currently closed to new comments.

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

All Comments

Collapse -

Excel and "&-Text"

by spn In reply to Excel and "&-Text"

3 Possablities
first with a maro this you will have read upon in the help file and creat a few basic maros to get a good idea of what to do(?nd not do).
OR
You can setup the document as required and use the excle funtion "Vlookup" so you have a spread sheet that pulls the info accross(this is super for working out quote on price list that change as the product discription etc will be pulled over)
OR
Set up a finished XLS
saveit
open your unformated XLS sheet
Select all the info to be copied
And copy
Now open a preformated XLS sheet(with/with out data)
select the first coloum that the data must start form and
IMPORTANT
select EDIT
PAST SPECIAL
and select VALUSE
OK
Hope that helps
SPiNner

Collapse -

Excel and "&-Text"

by rdu1961 In reply to Excel and "&-Text"

My brother-in-law said both were answers were great. Peyison, he said your's was the direction he had already taken. He liked your's Spinner and will keep it for reference to use later. Thanks for your help.

Collapse -

Excel and "&-Text"

by Peyison In reply to Excel and "&-Text"

Use Excel's Macro Recorder (Tools, Macro, Record New Macro) to create a macro (VBA script). Since the format of the file is always the same, this should be easy to do.

Once you start the macro recorder, you can name the macro and assign a shortcut key. Then just go through the steps to format the document the way you want it. When you're done, press the stop button on the macro toolbar.

You can view the code you just created by opening the VB editor (also from the Tools menu). In the VBAProject window on the left side, you should see the current workbook, and under it a folder called Modules. Open this and select Module1. This should open the module in the main VBA window. If you don't see the macro you created, use the drop down box on the top right of the screen to select your macro. If you ever need to make any changes you can edit the code directly.

Save the file, and use this workbook to import your file. If you want to get into VBA more you can even write code to delete the old text, import the file (it can ask for the file name to import) and format the data. Email me if you want more info on how to do this.

Good luck

Collapse -

Excel and "&-Text"

by rdu1961 In reply to Excel and "&-Text"

My brother-in-law said both were answers were great. Peyison, he said your's was the direction he had already taken. He liked your's Spinner and will keep it for reference to use later. Thanks for your help.

Collapse -

Excel and "&-Text"

by rdu1961 In reply to Excel and "&-Text"

This question was closed by the author

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

Related Discussions

Related Forums