MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Excel to Text file

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Problem Determination
View previous topic :: View next topic  
Author Message
arvibala
Beginner


Joined: 12 Feb 2008
Posts: 142
Topics: 67

PostPosted: Wed Aug 27, 2008 3:25 pm    Post subject: Excel to Text file Reply with quote

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
View user's profile Send private message Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12370
Topics: 75
Location: San Jose

PostPosted: Wed Aug 27, 2008 4:02 pm    Post subject: Reply with quote

arvibala,

Try saving the EXCEL file as TEXT (MS-DOS) (.txt) file from the save file drop down list

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
CJ7
Beginner


Joined: 30 Jun 2008
Posts: 1
Topics: 0

PostPosted: Fri Aug 29, 2008 4:18 pm    Post subject: Reply with quote

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
View user's profile Send private message
arvibala
Beginner


Joined: 12 Feb 2008
Posts: 142
Topics: 67

PostPosted: Thu Sep 25, 2008 3:59 pm    Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 699
Topics: 63
Location: USA

PostPosted: Thu Oct 02, 2008 6:07 pm    Post subject: Reply with quote

You can use modified concatenation to take care of length -
Code:
=right("000"&a1,3)&left(b1&"     ",5)&left(c1&"                    ",20)
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Problem Determination All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group