Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 114
Default Fixed Width Text Import Settings

I'm importing raw data into excel and using fixed width import settings have
everything looking the way I need it, but how can I save those settings so I
don't have to make changes three times a week? If anyone has a suggestion
please reply..thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Fixed Width Text Import Settings

You can record a macro while you do it once. Then in future you can just run
the macro again. You may need to edit the macro slightly if the filename
differs each time.

Hope this helps.

Pete

"Bryan" wrote in message
...
I'm importing raw data into excel and using fixed width import settings
have
everything looking the way I need it, but how can I save those settings so
I
don't have to make changes three times a week? If anyone has a suggestion
please reply..thanks!



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 114
Default Fixed Width Text Import Settings

What's the best practice for saving the macro in excel for future use?
Thanks,

"Pete_UK" wrote:

You can record a macro while you do it once. Then in future you can just run
the macro again. You may need to edit the macro slightly if the filename
differs each time.

Hope this helps.

Pete

"Bryan" wrote in message
...
I'm importing raw data into excel and using fixed width import settings
have
everything looking the way I need it, but how can I save those settings so
I
don't have to make changes three times a week? If anyone has a suggestion
please reply..thanks!




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Fixed Width Text Import Settings

I'm not sure this approaches best, but this is what I do:

Saved from a previous post:

Start a new workbook

Start recording a macro that will be stored in this macro workbook.

File|Open your text file that needs to be imported. Format it the way you
like. Insert columns, add headers, freeze panes, widen columns, add filters, do
the page setup--everything you can think of.

When you're done, save that workbook with the macro.

I like to put a big button from the Forms toolbar on the only worksheet in that
macro workbook and assign this macro to that big button. I'll add a few
instructions to that sheet, too.

If the file name to open is always the same and in the same location, then I'm
about done. If the location or file name changes, I'll tweak the code to ask
for the file.

My tweaked code could look a little like:

Option Explicit
Sub Testme01()

Dim myFileName As Variant

myFileName = Application.GetOpenFilename(filefilter:="Text Files, *.Txt", _
Title:="Pick a File")

If myFileName = False Then
MsgBox "Ok, try later" 'user hit cancel
Exit Sub
End If

Workbooks.OpenText Filename:=myFileName '....rest of recorded code here!

End Sub



Bryan wrote:

What's the best practice for saving the macro in excel for future use?
Thanks,

"Pete_UK" wrote:

You can record a macro while you do it once. Then in future you can just run
the macro again. You may need to edit the macro slightly if the filename
differs each time.

Hope this helps.

Pete

"Bryan" wrote in message
...
I'm importing raw data into excel and using fixed width import settings
have
everything looking the way I need it, but how can I save those settings so
I
don't have to make changes three times a week? If anyone has a suggestion
please reply..thanks!





--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Fixed Width Text Import Settings

If you start with a new workbook, start the macro recorder and then File |
Open and select the file and then choose the settings in the text import
wizard etc., etc., you will end up with two files - the original workbook
you started with will contain the macro but will otherwise remain unchanged.

So, each time you need to create a new file from the import, you will have
to open the file with the macro within it, and then run the macro, and it
will repeat the same actions giving you another file which you can File |
Save As and then close to save the file with a different name. All you will
need to do is open this "Master Import" file and then invoke the macro, and
the file is thus independent of the new file you are creating with the
import.

You could choose to save the macro in Personal.xls, so that it will be
constantly available to you. In this situation you will just invoke the
macro and it will create a new file.

Personally, I prefer the first option, but really it's up to you.

Hope this helps.

Pete

"Bryan" wrote in message
...
What's the best practice for saving the macro in excel for future use?
Thanks,

"Pete_UK" wrote:

You can record a macro while you do it once. Then in future you can just
run
the macro again. You may need to edit the macro slightly if the filename
differs each time.

Hope this helps.

Pete

"Bryan" wrote in message
...
I'm importing raw data into excel and using fixed width import settings
have
everything looking the way I need it, but how can I save those settings
so
I
don't have to make changes three times a week? If anyone has a
suggestion
please reply..thanks!






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Text to column, fixed width Daniel Charts and Charting in Excel 2 August 15th 07 04:38 PM
Text to column, fixed width Daniel Excel Discussion (Misc queries) 0 July 9th 07 07:52 PM
Repeatable Fixed Width Import donnie darko Excel Discussion (Misc queries) 9 December 6th 06 06:47 PM
HOW DO YOU SET THE DEFAULT FIXED COLOMN WIDTH ON THE EXCEL IMPORT Robert Belote Excel Discussion (Misc queries) 0 May 5th 06 08:33 PM
Automate the Text Import Wizard (Fixed Width) Yagnesh Excel Worksheet Functions 5 August 25th 05 08:08 PM


All times are GMT +1. The time now is 09:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"