segunda-feira, 1 de fevereiro de 2016

Curso WinDev - Excel - 002 - Ler Tabela e Exportar Para Excel












Video



Nessa Aula vou mostrar como pegar os dados de uma tabela e gravar no Excel
WinDev

http://doc.windev.com/en-US/?3074033&name=TableToExcel

http://doc.pcsoft.fr/fr-FR/?3074033&name=tableversexcel_fonction 


This lesson will show you how to take data from a table and write to Excel

Cette leçon va vous montrer comment prendre les données d'une table et écrire à Excel

s_path is string=CompleteDir(fExeDir())
// s_path=ComplèteRep(fRepExe()) // Em frances
TableToExcel(TABLE_pedido,s_path+"nome_excel.xls")
//TableVersExcel(TABLE_pedido,s_path+"nome_excel.xls") // em frances
ShellExecute(s_path+"nome_excel.xls")

















WinDev - Excel - 001/... Ler Planilha Excel e Gravar Arquivo
WinDev - Excel - 002/... Ler Tabela e Exportar Para Excel 
WinDev - Excel - 003/... Criar Excel e Listar
GERAR UM ARQUIVO EXCEL - DICAS 1748 - PUBLICA - WINDEV EXCEL 004 - 


Curso WinDev - Excel - 001 - Ler Planilha Excel e Gravar Arquivo










Video







Nessa Aula hoje, Vou Mostrar como Ler uma Planilha Excel e Gravar na Tabela do Banco
WinDev

http://doc.windev.com/en-US/?3080011&name=xlsNbRow 

http://doc.pcsoft.fr/fr-FR/?3080011&name=xlsnbligne_fonction 

http://doc.windev.com/en-US/?3080017&name=xlsOpen 

http://doc.pcsoft.fr/fr-FR/?3080017&name=xlsouvre_fonction 

http://doc.windev.com/en-US/?3080021&name=xlsdata_function 

http://doc.pcsoft.fr/fr-FR/?3080021&name=xlsDonnee 


In this hall today, I will show how Read and write an Excel worksheet in Table Bank

Dans cette salle aujourd'hui, je vais vous montrer comment lire et écrire une feuille de calcul Excel dans le tableau de la Banque


PROCEDURE importa_excel_ler_grava()

n_abre_excel is int=xlsOpen(EDT_Excel)
n_numero_linhas is int=xlsNbRow(n_abre_excel)
n_contador is int=0
FOR n_contador = 2 TO n_numero_linhas
    HReset(nota_rps_servico)
    s_codigo_municipio is string=xlsData(n_abre_excel,n_contador,3)  
    s_codigo_grupo is string=xlsData(n_abre_excel,n_contador,4)   
       
    nota_rps_servico.codigo_municipio=s_codigo_municipio
       
    HAdd(nota_rps_servico)
    Trace(n_contador)       
END

TraceEnd()
Info("Final da Gravacao")
EDT_Excel=""
ReturnToCapture(EDT_Excel)



























WinDev - Excel - 001/... Ler Planilha Excel e Gravar Arquivo
WinDev - Excel - 002/... Ler Tabela e Exportar Para Excel 
WinDev - Excel - 003/... Criar Excel e Listar
GERAR UM ARQUIVO EXCEL - DICAS 1748 - PUBLICA - WINDEV EXCEL 004 - 
INICIO - DICAS 1836- PUBLICA - WINDEV 23 -Spreadsheet_Excel 5
xlsNbRow PARTE 2 - DICAS 1946 - PRIVADA - WINDEV - EXCEL 7 - 
xlsData PARTE 3 - DICAS 1947 - PRIVADA - WINDEV - EXCEL 8 - 




WinDev - Função para saber si o Ano é Bissexto ou não








Link Funcao



Procedure Bissexto(ano is int)
IF (Modulo(ano,4)=0 AND Modulo(ano,100)<>0) OR (Modulo(ano,400)=0) THEN
RESULT True
ELSE
RESULT False
END


//Ou Pode ser utilizado deste outro modo
Procedure Bissexto(ano is int)

d_data_verifica is Date
d_data_verifica = DateSys()//Data Atual do Sistema
d_data_verifica..Year = ano//Trocamos o ano pelo ano passado por parámetro
d_ultimo_dia_mes is Date
d_ultimo_dia_mes = LastDayOfMonth(d_data_verifica..Year,2) //Verifica ultima dia do Mes de Fevereiro
IF d_ultimo_dia_mes..Day = 28 THEN
RESULT False
ELSE
RESULT True
END









Teste

Teste
teste