Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
8
Erster Beitrag:
vor 3 Monaten, 4 Wochen
Letzter Beitrag:
vor 3 Monaten, 3 Wochen
Beteiligte Autoren:
Peter Holemans, Tor-Bjarne, Allard, Jose Antonio Garrido, Fabrice Harari, PETER ZHOU

WINDEV and EXCEL functions

Startbeitrag von PETER ZHOU am 24.04.2017 05:18

Hi,

I have a client that wants to update a few excel file and have the data update to to HF SQL database real-time ( while the excel file still opened ).

Does windev's excel function work well for this requirement ?

Regards,

Peter Zhou

Antworten:

Hi Peter,

AFAIK, an excel file is LOCKED by excel while open, so accessing it in real time from the outside is impossible.

In order to accomplish what you are describing, the only way seems to be to write an excel macro and install it in each of the excel sheets in question. This macro would detect changes and write them in an outside/NOT locked file (it could be a simple text file with line+colum+content ). Then the windev program could detect THIS change and get it inside the DB.

Best regards

von Fabrice Harari - am 24.04.2017 09:33
Hi.
You can also use OLE automation.
I have used it to communicate with MsWord and MsOutlook, and it's also possible with Ms Excel.

Within windev there are some examples relating MsWord, but i'm not sure if there is any example about controlling MsExcel.

Edit:
I have MsExcel 2013, and to my surprise I opened a .xls file and it was not locked. I could read AND WRITE it in an external program (notepad).
So maybe you can even use the regular WLangue Functions and chech the file periodically

von Jose Antonio Garrido - am 24.04.2017 10:11
Hi,

From what I understand from Peter's explanation is that the end-user would want to update an Excel file and that the changes are reflected into an HF database.

I see only one possibility with WX and that is to try the Spreadsheet control that is available in WD20 and later. From what I read, there are possible ways to write the data back to the database and to visualise standard Excel files.

At one of my clients they use enterprise MS Office Excel data plugins (I believe it is the MS Excel OLAP plugin) to update budgetting figures straight from Excel files into a SQL Server OLAP data warehouse. This might possibly also work with an HFSQL OleDB connection and a non OLAP but a standard External Data plugin but I'm not sure though.

Cheers,

Peter

von Peter Holemans - am 24.04.2017 11:36
Hi,

You could also check out the Farpoint Spread control as it has more options than the WD one.

Cheers
Tor-Bjarne

von Tor-Bjarne - am 30.04.2017 07:47
Hi,

Syncfusion also has Excel compatible components that may serve your needs: https://www.syncfusion.com/products/file-formats/xlsio

You could try with the free community license for internal use to see if it works out.
Once you deploy it to customers you'll have to verify the licensing options.
Price is reasonable starting around 1000€/$ for the complete suite.

Cheers,

Peter

von Peter Holemans - am 30.04.2017 08:50
BTW, for those who have been reluctant but want to have an easily understandable quickstart on OO programming there are excellent extremely digestable freebie books that can be found here. the OO book is focused on DotNet C# but the main principles (apart from quite some Wlanguage restrictions and non-implemented concepts like interfaces) can be applied/used in WX as well.

Here's the link to the eBook (It's extremely digestable and you don't even need to know C# to understand it).
- OO with C#: https://www.syncfusion.com/resources/techportal/details/ebooks/oop-csharp

You can find many other freebie books on many subjects there as well.

All the best,

Peter Holemans

von Peter Holemans - am 30.04.2017 09:39
Hi Peter. If you qualifi you can get the controls for free ( community ) even in production

regards

Allard

von Allard - am 01.05.2017 09:59
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.