Import from mainframe

G

Guest

We have an automated mainframe process that sends a Lotus Notes email to the
users of our system. This email contains a link to a mainframe file so that
when the user clicks the link the file will open in Excel. An example of the
link
HTTP://SDCVM01.CGS.COM:82/~ITSWEB.1...PREAD(0)&LENGTHS=3,24,24,4,2,12,18,13,11,8,60
Where HTTP thru 102/ is the server ID, FLC is a mainframe command (we use VM
CMS), DIS.OPDICB34.SPREAD(0) is the data set name on the mainframe, and
&LENGTHS= describes the fixed width data by Excel column (first 3 characters
go to column 1, next 24 to col 2, next 24 to col 3, next 4 to col 4, etc.)
This process works quite well, but I would like to know if there is a way to
"pretty up" the resulting spreadsheet. Right now the users have to manually
adjust the column widths to see all the data, we have no control over fonts,
etc. Does anyone know of a way to supply more control information to Excel?

Thanks for your help.
 
P

PY & Associates

Why do users have to adjust the column widths when
&LENGTHS= describes the fixed width data by Excel column (first 3 characters
go to column 1, next 24 to col 2, next 24 to col 3, next 4 to col 4, etc.)
"pretty up" the resulting spreadsheet

can be done if one can define what is the desired effect please
 
G

Gary Keramidas

you could at least run this to adjust the columns widths

Option Explicit
Dim lastcol As LongSub adj_col()
lastcol = Cells(1, 256).End(xlToLeft).Column
Range(Columns(1), Columns(lastcol)).EntireColumn.AutoFit
End Sub
 
G

Guest

Because Excel defaults to a standard column width when displaying the data,
forcing the users to manually adjust the column widths to see all of the
data. The &LENGTHS= option allows Excel to put the correct data in the
correct columns with the correct length, but it doesn't DISPLAY the correct
length.

Thanks for your interest in this issue.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top