Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming,microsoft.public.excel.misc
|
|||
|
|||
![]()
Hello. I would really appreciate someone's help with my problem.
I have been asked to figure out a way to automate the import of text files into Excel. The import process MUST be automated by a macro because the users are not able to do this on their own. I have tried manually importing the file into Excel two different ways: 1. When I import using the "Delimited" data type with "Space" as the delimiter, it doesn't work because each word of the 3 rows of headings are separated into separate columns because of the single space between them. 2. When I import using the "Fixed Width" data type, it doesn't work because all the text on one row is placed into the first cell of each row and, therefore, the columns of numbers are not aligned. I have included a simplified version of the text file below. Does anyone know how I can make this file automatically import using **MORE** than one space as the delimiter (so it doesn't mess up all the headings)? I would really appreciate your help. Thanks, Jessi BENTLEY AREA AUTHORITY Service Work Log Report 05/04/2006 2:45pm Page 1 Staff ID Name SAL No Date Payroll ----Reported Hours--- 728739 BROWN 099999 05/04/2006 8:00 5:00 3:00 478920 SMITH 097584 05/03/2006 8:00 4:00 4:00 347822 CUNNINGHAM 038477 05/03/2006 8:00 4:30 3:30 482730 DENNY 088887 05/03/2006 10:00 4:00 6:00 ********** Total ********** 34.0 17.5 16.5 |
#2
![]()
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Jessi, I copied your data into a text file and then imported it into a
spreadsheet by selecting the "Delimited" choice but starting the import at row 10 (the row where the data actually starts); you can change the default start row of 1 by changing the "Start import at row" property on the same dialogue page where you indicate the "Delimited" choice. Click Next and select the "Space" delimiter. Your data should parse okay now. The only hitch is that you don't get the headers imported along with the data. What I'd suggest, if you need those headers, is to set up a template spreadsheet with the headers and then in the first available row below the headers specify the leftmost cell as the one where the data import should start (this is indicated in the last page of the import dialogue). " wrote: Hello. I would really appreciate someone's help with my problem. I have been asked to figure out a way to automate the import of text files into Excel. The import process MUST be automated by a macro because the users are not able to do this on their own. I have tried manually importing the file into Excel two different ways: 1. When I import using the "Delimited" data type with "Space" as the delimiter, it doesn't work because each word of the 3 rows of headings are separated into separate columns because of the single space between them. 2. When I import using the "Fixed Width" data type, it doesn't work because all the text on one row is placed into the first cell of each row and, therefore, the columns of numbers are not aligned. I have included a simplified version of the text file below. Does anyone know how I can make this file automatically import using **MORE** than one space as the delimiter (so it doesn't mess up all the headings)? I would really appreciate your help. Thanks, Jessi BENTLEY AREA AUTHORITY Service Work Log Report 05/04/2006 2:45pm Page 1 Staff ID Name SAL No Date Payroll ----Reported Hours--- 728739 BROWN 099999 05/04/2006 8:00 5:00 3:00 478920 SMITH 097584 05/03/2006 8:00 4:00 4:00 347822 CUNNINGHAM 038477 05/03/2006 8:00 4:30 3:30 482730 DENNY 088887 05/03/2006 10:00 4:00 6:00 ********** Total ********** 34.0 17.5 16.5 |
#3
![]()
Posted to microsoft.public.excel.misc, microsoft.public.excel.programming
|
|||
|
|||
![]()
Have you tried manually importing the file into Excel using the
"Delimited" data type with "Space" as the delimiter, and indicating on the 1st screen of The Wizard, Start with Row 4 (after the header)? " wrote in message ups.com: Hello. I would really appreciate someone's help with my problem. I have been asked to figure out a way to automate the import of text files into Excel. The import process MUST be automated by a macro because the users are not able to do this on their own. I have tried manually importing the file into Excel two different ways: 1. When I import using the "Delimited" data type with "Space" as the delimiter, it doesn't work because each word of the 3 rows of headings are separated into separate columns because of the single space between them. 2. When I import using the "Fixed Width" data type, it doesn't work because all the text on one row is placed into the first cell of each row and, therefore, the columns of numbers are not aligned. I have included a simplified version of the text file below. Does anyone know how I can make this file automatically import using **MORE** than one space as the delimiter (so it doesn't mess up all the headings)? I would really appreciate your help. Thanks, Jessi BENTLEY AREA AUTHORITY Service Work Log Report 05/04/2006 2:45pm Page 1 Staff ID Name SAL No Date Payroll ----Reported Hours--- 728739 BROWN 099999 05/04/2006 8:00 5:00 3:00 478920 SMITH 097584 05/03/2006 8:00 4:00 4:00 347822 CUNNINGHAM 038477 05/03/2006 8:00 4:30 3:30 482730 DENNY 088887 05/03/2006 10:00 4:00 6:00 ********** Total ********** 34.0 17.5 16.5 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Text file saving, setting file origin | Excel Discussion (Misc queries) | |||
Importing text file to excel | Excel Discussion (Misc queries) | |||
Issues with saving text file | Excel Worksheet Functions | |||
Last Column(=spaces) is Dropped When Importing from .Txt file | Excel Discussion (Misc queries) | |||
Convert text file to MS_Excel | Excel Discussion (Misc queries) |