on 12-13-2015 1:29 AM
Greetings All,
I need to provide my users with the ability to import a file (spreadsheet) in my Appeon and process it in a datawindow.
In PB I have had good success using a Winform Target to be able to call LibXL.Net.DLL to open a spreadsheet and read and write to it using a PowerBuilder Winform Client.
And now I am wondering if that capability might exist in Appeon. The documentation says that I can use a Winform target, but states that I have to re-write my code and possibly use something called the AppeonDotNetComponent.
So before I go any further down the rabbit hole, does this sound at all feasible?
If so, can someone point me in the right direction?
If not, is there some other way to open a file in the Appeon Web Client and read the spreadsheet so I can import the data?
Thank you!!
Paul
Hi Paul;
As another alternative ... What about using a PB based Web Service to Read + Write to the Excel spreadsheet using the "LibX.Net.DLL"? The PB Web Service will run like a WebForms application ... A "kissing cousin" to the Winform application. Both of these generate C# BTW.
Regards ... Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Chris!
Now I am way down the rabbit hole.
Question: Does that mean that I cannot use the libxl.net.dll in the Appeon client?
Question: If I do go via web service, how do I get the spreadsheet to where it needs to be to get processed and how do I get it back to the client with entries via libxl.net.dll?
Question: Can I have the client save the spreadsheet as comma delimited and simply import into a datawindow for processing?
Thank you,
Paul
Yes, importing as tab or comma delimited will work very nicely. mostly just like PB. Note that appeon is limited in importing comma delimited to full file only . while tab delimited can be done either as full file or a row/line at a time.
the other option is to use excel directly via the excel com objects to import/export to excel. this means the client would require excel to be installed:
ioo_excel = CREATE OleObject
ll_rval = ioo_excel.ConnectToNewObject("Excel.Application")
....
Q1: Does that mean that I cannot use the libxl.net.dll in the Appeon client?
A1: Appeon Mobile: NO
Appeon Web: Should work via Appeon`s .Net assembly support
(as long at there is no visual aspect to this DLL).
Q2: Does that mean that I cannot use the libxl.net.dll in the Appeon client?
A2: Have the Web Service return a Blob. -OR-
- Do what I do in my imaging applications & save the datastream to a Blob column
- Then use a Select Blob directly from your Appeon code
Note: Using this approach you can support Appeon Mobile as well.
Q3: Can I have the client save the spreadsheet as comma delimited and simply import into a datawindow for processing?
A3: YES
look up importfile and importstring in powerbuilder help.
the basic command is: dw_1.importfile("c:mytextfile.csv")
if you google powerbuilder and excel you get a lot of hits such as:
http://stackoverflow.com/questions/11223315/write-and-read-from-excel-using-powerbuilder
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.