Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Text Import Wizard Breaklines
When I import a text file and use set widths, there are already preset line breaks there. Is there a way to set the default location for these lines? I import text files every day, and have to move the breaks that are there. It would be much faster to have these preset where I want them. Any hlep would be great. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Text Import Wizard Breaklines
If you were using a vba macro, you could automate the whole import. Have you considered that? -- future_vba_expert "balterson" wrote: When I import a text file and use set widths, there are already preset line breaks there. Is there a way to set the default location for these lines? I import text files every day, and have to move the breaks that are there. It would be much faster to have these preset where I want them. Any hlep would be great. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Text Import Wizard Breaklines
Use the macro recorder while performing the operations. Then run the macro each time you import the file. A dialog box can be added to the code to help you select the file you want to import. In excel 2003 Tools - Macro - Start Recording. Import file stop recording Tools - Macro - Stop Recording Go to VBA window by typing ALT-F11. Find macro under Modules in VBA project window. "balterson" wrote: When I import a text file and use set widths, there are already preset line breaks there. Is there a way to set the default location for these lines? I import text files every day, and have to move the breaks that are there. It would be much faster to have these preset where I want them. Any hlep would be great. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Text Import Wizard Breaklines
I am not sure what you mean. I have use macros all the time, but what is a VBA macro? There are six different text files that get imported daily into a it's own separate spreadsheet, and all are named with the date and which cycle it is. Does a vba macro take that into consideration? "future_vba_expert" wrote: If you were using a vba macro, you could automate the whole import. Have you considered that? -- future_vba_expert "balterson" wrote: When I import a text file and use set widths, there are already preset line breaks there. Is there a way to set the default location for these lines? I import text files every day, and have to move the breaks that are there. It would be much faster to have these preset where I want them. Any hlep would be great. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Text Import Wizard Breaklines
I believe all macros in Excel are written in VBA (Visual Basic for Applications). As Joel said in his reply, you can record what you are doing manually, then next time you don't have to go thru all the steps; you can just run the macro. -- future_vba_expert "balterson" wrote: I am not sure what you mean. I have use macros all the time, but what is a VBA macro? There are six different text files that get imported daily into a it's own separate spreadsheet, and all are named with the date and which cycle it is. Does a vba macro take that into consideration? "future_vba_expert" wrote: If you were using a vba macro, you could automate the whole import. Have you considered that? -- future_vba_expert "balterson" wrote: When I import a text file and use set widths, there are already preset line breaks there. Is there a way to set the default location for these lines? I import text files every day, and have to move the breaks that are there. It would be much faster to have these preset where I want them. Any hlep would be great. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
vba
I am tracking with you now. I edit all the time in Visual Basic, just didn't know what the vba stood for. So what do I put in place of the file name in order for it to bring up the open box? |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
vba
You need to record one of your text import sessions, then run it as needed. To do this, you go to Tools, Macro, Record New Macro. It will give it a name for you, or you can name it. When you are done recording, go to Tools, Macro, Stop Recording. Then go to Tools, Macro, Macros, click on the macro, and click on Run. If you want to see the code it created for you, instead of Run, click Edit. You can then modify the code to make it do other text imports, if they are similar, or whatever other changes you want. Hope that helps. -- future_vba_expert "balterson" wrote: I am tracking with you now. I edit all the time in Visual Basic, just didn't know what the vba stood for. So what do I put in place of the file name in order for it to bring up the open box? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to Start Excel in Text Import Wizard for data import | Setting up and Configuration of Excel | |||
Text import wizard bug | Excel Programming | |||
Text Import Wizard | Excel Discussion (Misc queries) | |||
Text Import Wizard | Excel Discussion (Misc queries) | |||
Text Import Wizard | Excel Programming |