FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 2024
→
Exporting Query to EXCEL (WD7.5) ... again
Exporting Query to EXCEL (WD7.5) ... again
Débuté par Swissstephan, 09 jan. 2004 18:06 - 1 réponse
Connectez-vous…
Swissstephan
#1
Posté le 09 janvier 2004 - 18:06
Hello
I guess this topic can bore you but I think a read every possible line in the manual, helptext and ofcourse in this forum but I can't find an answer.
I simply (probabely not) want to export a query result to an excel file without showing anything in a window.
what do i do wrong.
This is my best guess
Line 1,3,4 run fine it's the second one ...
1.IF HExecuteQuery(lcQueryName, hQueryDefault, ldStartDateTime, ldEndDateTime) THEN
//info(hnbrec(lcQueryName))
2.TableToExcel(lcQueryName, lcOutputFile)
3.HCancelDeclaration(lcQueryName)
4.END
If someone has an idea, please
Thanks in advance
Stephan
Signaler
0
0
King
#2
Posté le 12 janvier 2004 - 17:17
All you need is a memory table to hold each row of lcQueryName and loop thru'
until
the last record reached.
You may add the code after line 1 shown as below:
HreadFirst(lcQueryName)
While not h.out
TableAdd(myMemoryTable, lcQueryName.column1+tab+lcQueryName.column2+tab+...)
HReadNext(lcQueryName)
End
//carry on yr line 2 as below
2.TableToExcel(myMemoryTable, lcOutputFile)
But it's a good idea to have a proposed function like line 2 of named
HQueryResultToExcel(lcQueryName) //Direct them all, why not
Technical speaking, HReadFirst(lcQueryName) works like a cursor
(pointer to the first record) and
TableAdd() works like fetching the contents into a memory table (buffer).
When the end of record reached and fetched, you should get what you want.
Happy again!
Regs
King
Swissstephan <iswiestner@bluewin.ch> wrote:
Hello
I guess this topic can bore you but I think a read every possible line in
the manual,
helptext and ofcourse in this forum but I can't find an answer.
I simply (probabely not) want to export a query result to an excel file
without showing
anything in a window.
what do i do wrong.
This is my best guess
Line 1,3,4 run fine it's the second one ...
1.IF HExecuteQuery(lcQueryName, hQueryDefault, ldStartDateTime, ldEndDateTime)
THEN
//info(hnbrec(lcQueryName))
2.TableToExcel(lcQueryName, lcOutputFile)
3.HCancelDeclaration(lcQueryName)
4.END
If someone has an idea, please
Thanks in advance
Stephan
Signaler
0
0
→ Revenir à WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte