Create a spreadsheet-ready file from a JES2Mail or JES2FTP report
With the RPL language of JES2Mail or JES2FTP, one can easily create a spreadsheet-ready, comma-delimited file from a report. For example, here is a
sales report that would be beneficial to bring into a spreadsheet for manipulation:
By using the following script in the JES2Mail/FTP ruleset, a comma-delimited
file named sales.csv will be created, which can then be imported into Excel:
)InitialPage
ZExtractFileName = 'sales.csv'
ExtractData(Comma, " ", 5:2, 5:134)
)OnEachPage
ExtractData(Comma, "25x,11x,13x,13x,13x,13x,13x,13x,13x", 7:2)
Outputpage
The InitialPage section of the script sets the file name and places the column
headings from line 5 of the report into the spreadsheet file. The OnEachPage
section extracts each row of data from each page starting with line 7 until it
reaches the last row of data on that page. Both the report itself AND the
spreadsheet file will be sent to the destination. If you only want the
spreadsheet file be delivered, then simply remove the "Outputpage" statement
from the OnEachPage section.
When the recipient opens the "sales.csv" file they will see Excel open with the
following:
That's all there is to it!
© 2008 Computer Application Services, Inc. - All Rights Reserved