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 

How download Excel file to a flat file(formatted)

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
sudhtech27
Beginner


Joined: 07 Oct 2003
Posts: 8
Topics: 6

PostPosted: Tue Jan 27, 2004 12:41 pm    Post subject: How download Excel file to a flat file(formatted) Reply with quote

Hi,
I have 3 separate x-cel sheets each of 3 coloumns. I want to download these to a flat file. I tried from HOST SEND/RECEIVE option. My format is getting disturbed, I.e coloumns are getting merged are truncated.
Is there any program/job/tool that I can use to solve this quickly. I have millions of records in each of these x-cel sheets.
Any light on this is appreciated!
Thanks
S n K
Back to top
View user's profile Send private message
Bithead
Advanced


Joined: 03 Jan 2003
Posts: 550
Topics: 23
Location: Michigan, USA

PostPosted: Tue Jan 27, 2004 1:13 pm    Post subject: Reply with quote

Try using the VBA script feature (<alt><f11>) to create a formatted file.
Here is an example. Use f8 to step thru it first. when satisfied, use f5 to run.


sub a

sp=string(60," ")
open "C:\my.file.name" for output as #1
sheet1.select
x = 1
loop1:
if cells(x,1).value = "" then
close #1
msgbox "I am all done"
exit sub
endif
f1 = left(cells(x,1).value & sp, 20) <= change 20 to required length
f2 = left(cells(x,2).value & sp, 20) <= change 20 to required length
f3 = left(cells(x,3).value & sp, 20) <= change 20 to required length
print #1, f1 & f2 & f3
x=x+1
doevents
goto loop1

end sub
Back to top
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Wed Jan 28, 2004 9:30 am    Post subject: Reply with quote

I'm a bit confused. What do issues concerning Excel have to do with MVS? I guess I'm wondering why this was posted to an MVS forum?
Back to top
View user's profile Send private message
Bithead
Advanced


Joined: 03 Jan 2003
Posts: 550
Topics: 23
Location: Michigan, USA

PostPosted: Wed Jan 28, 2004 10:00 am    Post subject: Reply with quote

There may have been a way to process spreadsheets on MVS. I can't think of one.
Back to top
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Wed Jan 28, 2004 10:07 am    Post subject: Reply with quote

Not to change the subject, but do any of you remember when Lotus 1-2-3 was available for the mainframe?
Back to top
View user's profile Send private message
sriramla
Beginner


Joined: 22 Feb 2003
Posts: 74
Topics: 1

PostPosted: Tue Feb 03, 2004 7:51 am    Post subject: Reply with quote

In MS-EXCEL, go to File -> save As...option and save the file in "space delimited" or "comma separated" file. Then download to mainframe in a PS. Parse the data to suite your requirements.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming 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