View previous topic :: View next topic |
Author |
Message |
sudhtech27 Beginner
Joined: 07 Oct 2003 Posts: 8 Topics: 6
|
Posted: Tue Jan 27, 2004 12:41 pm Post subject: How download Excel file to a flat file(formatted) |
|
|
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 |
|
 |
Bithead Advanced

Joined: 03 Jan 2003 Posts: 550 Topics: 23 Location: Michigan, USA
|
Posted: Tue Jan 27, 2004 1:13 pm Post subject: |
|
|
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 |
|
 |
superk Advanced

Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Wed Jan 28, 2004 9:30 am Post subject: |
|
|
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 |
|
 |
Bithead Advanced

Joined: 03 Jan 2003 Posts: 550 Topics: 23 Location: Michigan, USA
|
Posted: Wed Jan 28, 2004 10:00 am Post subject: |
|
|
There may have been a way to process spreadsheets on MVS. I can't think of one. |
|
Back to top |
|
 |
superk Advanced

Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Wed Jan 28, 2004 10:07 am Post subject: |
|
|
Not to change the subject, but do any of you remember when Lotus 1-2-3 was available for the mainframe? |
|
Back to top |
|
 |
sriramla Beginner
Joined: 22 Feb 2003 Posts: 74 Topics: 1
|
Posted: Tue Feb 03, 2004 7:51 am Post subject: |
|
|
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 |
|
 |
|
|