FOROS PROFESIONALES
WINDEV
,
WEBDEV
y
WINDEV Mobile
Inicio
|
Mensajes recientes
|
Conéctese...
|
Desconectar
|
Español
Inicio
→
WINDEV 2024
→
Exporting Query to EXCEL (WD7.5) ... again
Exporting Query to EXCEL (WD7.5) ... again
Iniciado por Swissstephan, 09,ene. 2004 18:06 - 1 respuesta
Conéctese…
Swissstephan
#1
Publicado el 09,enero 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
Informar
0
0
King
#2
Publicado el 12,enero 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
Informar
0
0
→ Volver a WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (versiones precedentes)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Búsqueda Tipo
Sólo temas
Todos los mensajes
Periodo Buscar
Cualquier fecha
Última hora
Última 24 horas
Última semana
Último mes
Último año
Cancelar
Vista previa del mensaje
Añadiendo una imagen
Importar una imagen desde una URL
Enviar una imagen desde un archivo de su disco
Arrastrar un archivo o click en "Examinar..."
o
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto