View previous topic :: View next topic |
Author |
Message |
arvibala Beginner
Joined: 12 Feb 2008 Posts: 142 Topics: 67
|
Posted: Wed Aug 27, 2008 3:25 pm Post subject: Excel to Text file |
|
|
Hi,
I have a data in excel. I need to copy that in a notepad and upload that in MF. If I save that as ".txt", the fields are delimited with space. But I dont want that way. I want it continously.
For example
NUM - 3 length Field
NAME- 5 length Field
DESIG - 20 length Field
Contents of my Excel File
NUM NAME DESIG
--- ---- -----
100 Ramon PROGRAMMER
200 BOB MANAGER
Notepad Output shud be
100RamonPROGRAMMER
200BOB MANAGER
I want to do this manually without writing any macro.
Pls help
Thanks _________________ Arvind
"You can make a difference with your smile. Have that with you always" |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Wed Aug 27, 2008 4:02 pm Post subject: |
|
|
arvibala,
Try saving the EXCEL file as TEXT (MS-DOS) (.txt) file from the save file drop down list
Kolusu |
|
Back to top |
|
|
CJ7 Beginner
Joined: 30 Jun 2008 Posts: 1 Topics: 0
|
Posted: Fri Aug 29, 2008 4:18 pm Post subject: |
|
|
If I want to make sure that there are no tabs or spaces or other weird stuff in my data that comes from Excel, I use the concatenation feature in Excel.
If your data is in columns A B and C, then you need to go to column D and type this formula: =A1&B1&C1
That will concatenate the data from all 3 columns into column D. Copy that formula down column D to the end of your data.
To get it to a format for export, you want to get rid of the formulas and only keep the data. To do this, select all the records in Column D, right-click and select Copy. Then while pointing at the first cell in column D, right-click again and select Paste Special, then select Values, select Okay, and press enter. Now if you look at the contents of each cell, you don't see the formula anymore but you see the data concatenated into one string.
The last thing you need to do is get that string of data into a worksheet by itself so you can save it as a .txt format. You can either delete columns A,B,and C (leaving only D) or you can copy the data from column D into a new worksheet.
By the way, you can also use this technique to add a delimiter such as ~ or comma: =A1&'~'&B1&'~'&C1 etc. _________________ CJ7 |
|
Back to top |
|
|
arvibala Beginner
Joined: 12 Feb 2008 Posts: 142 Topics: 67
|
Posted: Thu Sep 25, 2008 3:59 pm Post subject: |
|
|
Hi CJ7,
Your logic will not work. The Concatenation should be based on Field length and not the actual field values. If its on actual field values, it will be difficult to Map in our programs.
Thanks
Arvind B _________________ Arvind
"You can make a difference with your smile. Have that with you always" |
|
Back to top |
|
|
Dibakar Advanced
Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Thu Oct 02, 2008 6:07 pm Post subject: |
|
|
You can use modified concatenation to take care of length -
Code: | =right("000"&a1,3)&left(b1&" ",5)&left(c1&" ",20) |
|
|
Back to top |
|
|
|
|