GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEV
,
WEBDEV
e
WINDEV Mobile
Inicio
|
Mensagens recentes
|
Conecte-se...
|
Disconnect
|
Português
Inicio
→
WINDEV 2024
→
Exporting Query to EXCEL (WD7.5) ... again
Exporting Query to EXCEL (WD7.5) ... again
Iniciado por Swissstephan, jan., 09 2004 6:06 PM - 1 resposta
Conecte-se…
Swissstephan
#1
Publicado em janeiro, 09 2004 - 6:06 PM
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
Denunciar
0
0
King
#2
Publicado em janeiro, 12 2004 - 5:17 PM
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
Denunciar
0
0
→ Voltar para WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (versões anteriores)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Tipo de Pesquisa
Apenas tópicos
Todas as mensagens
Período de pesquisa
Qualquer momento
Última hora
Últimas 24 horas
Semana passada
Mês passado
Ano passado
Cancelar
Pré-visualização da sua mensagem
Adicionar imagem
Importar uma imagem de uma URL
Enviar uma imagem a partir do seu disco
Deixe um ficheiro ou clique em "Procurar ..."
ou
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto