Uploading an Excel to a file?

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
cproctor
New User
Posts: 11
Joined: Thu Jun 12, 2014 1:59 pm
First Name: Chris
Last Name: Proctor
Company Name: Columbia Sportswear Co.
Phone: 5039851509
State / Province: Oregon
Country: United States
Contact:

Uploading an Excel to a file?

Post by cproctor »

Good afternoon. I know we can add a link to a screen to export data to an excel spreadsheet. Is there the ability to go the other way? In other words, we have users who have data on a spreadsheet and they would like to import it into a file. Obviously, this ability would require mapping a column to a field and I'm guessing some possible validation. I'm just wondering if this is even possible.

Thanks!
Chris Proctor
Columbia Sportswear Company
Paul
Profound User
Posts: 39
Joined: Mon Aug 29, 2011 10:53 pm
First Name: Paul
Last Name: Foster
Company Name: GRI Group Ltd
Country: Hong Kong
Location: Hong Kong
Contact:

Re: Uploading an Excel to a file?

Post by Paul »

Chris,

We do this using Scott's port of POI to RPG (https://www.scottklement.com/poi/). You are right, you need to do your mapping etc within the RPG. Use the File Upload widget (under Input Controls in Designer) to load the Excel, then process it in RPG.

If anyone has a better way please share!

Paul
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Uploading an Excel to a file?

Post by Scott Klement »

Profound UI does not have anything that specifically reads an Excel file.

You can use our File Upload widget to allow the user to upload files (of any sort) from their PC to IBM i. You could use the 'allowed type' property to restrict it so that it only allows Excel files to be uploaded if you wish. The upload widget will put the file into the IFS for you.

It will be up to you to interpret the file. If you ask the user to upload a CSV file, you could use something like IBM's CPYFRMIMPF to interpret it, or a tool like my CSVR4 program, or something like that. (This is the format that Profound UI exports...)

Or, if the user uploads a normal Excel spreadsheet in XLS or XLSX format, then you could use a tool like POI (as Paul suggests) to read the file.

In any case, it is not a feature of Profound UI to interpret the file, you'd need to code this yourself using one of the above methods.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest