PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WEBDEV 2024 → Importing Excel data into a Webdev App from Windev
Importing Excel data into a Webdev App from Windev
Iniciado por Diego, 02,abr. 2015 00:59 - 4 respuestas
Publicado el 02,abril 2015 - 00:59
Hi
I have a bunch of data in Excel Spreadsheets that I need to import into HFSQL tables

By a bunch I mean 100,000+ records

I have been playing with the only progress bar Webdev allows, and I tell you, it´s something to forget about, the examples apply only for the uploading, I haven´t found a real life example of a progress bar in Webdev, so I am going to follow the advice on the code of the WW_Server_Wait example:
// Reminder: if the process is very long, we advise you to
// leave it to a WINDEV application that will operate in "back-office" on the server.

So my question is: Can I have an application in Windev that does all the Excel import part using the same analysis and connection ?
Publicado el 02,abril 2015 - 15:09
Hi Diego

it is possible to have a progressbar being displayed on the browser side
while a process is run on the server side, but you need some finagling
(after all, we are talking about 2 separate computers and code systems)...

To do that, you can do the following :
- run your server process using an ajaxexecuteasynchronous (the browser
doesn't wait for the answer)
- on the server side/process, write your level of progress SOMEWHERE
(ini file, HF record, whatever works in your case)
- on the browser side, set a timer (every 1 or 2 seconds, when you want
to refresh the progress bar), and do an ajaxexecute of a server proc
that read and returns the value of the progress, and display it using
your progress bar

However, the main problem with LONG process is not the progress bar,
it's the fact that you can EXCEED your session time out and therefore
have your process interrupted...

So if you CAN be in that situation, then yes, a windev program IS the
solution, can share your analysis and connection and be run from the
server code with an EXERun or equivalent... Just use the command line to
tell it what it has to do...

ou can of course STILL use the progress bar "trick" described above with
a windev program doing the import, this program then being in charge of
writing the progress level instead of a webdev server procedure.
Everything else remains the same

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

NEW: WXReplication, your open source replication system is available on
my web site!!!
WXShowroom.com: Show your projects!
More information on http://www.fabriceharari.com


On 4/1/2015 4:59 PM, Diego wrote:
Hi
I have a bunch of data in Excel Spreadsheets that I need to import into
HFSQL tables

By a bunch I mean 100,000+ records

I have been playing with the only progress bar Webdev allows, and I tell
you, it´s something to forget about, the examples apply only for the
uploading, I haven´t found a real life example of a progress bar in
Webdev, so I am going to follow the advice on the code of the
WW_Server_Wait example:
// Reminder: if the process is very long, we advise you to
// leave it to a WINDEV application that will operate in "back-office"
on the server.

So my question is: Can I have an application in Windev that does all the
Excel import part using the same analysis and connection ?
Publicado el 02,abril 2015 - 15:42
Hi Harari and thanks for your time

I thought it was going to be easier, as conecting to the HFSQL server "on the other side" and do the import right from my desktop computer :)
I am in charge of the import so maybe I can create a small Windev project and using remote desktop, I will load it up on the server and run it from there, just as if I was in my own desktop computer
Publicado el 02,abril 2015 - 16:22
Hi Diego

You can certainly do that... If you are the only one doing the import
and it's not to be done too often

Otherwise, an upload field and a server procedure running the exe, and
you are all set

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

NEW: WXReplication, your open source replication system is available on
my web site!!!
WXShowroom.com: Show your projects!
More information on http://www.fabriceharari.com


On 4/2/2015 7:42 AM, Diego wrote:
Hi Harari and thanks for your time

I thought it was going to be easier, as conecting to the HFSQL server
"on the other side" and do the import right from my desktop computer :)
I am in charge of the import so maybe I can create a small Windev
project and using remote desktop, I will load it up on the server and
run it from there, just as if I was in my own desktop computer
Publicado el 06,abril 2015 - 15:23
Thanks, and Yes I am the only one who´s in charge of the import, once it´s done the windev app will no longer work