FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV Mobile 2024
→
Excel file in android
Excel file in android
Débuté par JOHNKEN, 22 juin 2015 08:43 - 6 réponses
Connectez-vous…
JOHNKEN
#1
Membre enregistré
26 messages
Posté le 22 juin 2015 - 08:43
Anyone who tried creating excel file in android?
Signaler
0
0
adrianoboller
#2
Membre enregistré
3 660 messages
Popularité : +175 (223 votes)
Posté le 24 juin 2015 - 20:13
//Relatorio Manual Excel
ok is
boolean
=
False
CAB is
int
=
0
Lineprint is
string
=
""
s
FileName is
string
=
""
contador is
int
=
0
IF
GloAno
=
""
THEN
GloAno
=
CurrentYear
(
)
END
Numero_Ano is
string
=
GloNumFechamento
+
"_"
+
GloAno
IF
gn
ConvenioAdministrador
<
>
""
THEN
Lineprint
=
""
Ordem is
string
=
""
IF
RADIO_
OrdemImpressao
..
Value
=
1
Ordem
=
"Funcionario"
ELSE IF
RADIO_
OrdemImpressao
..
Value
=
2
Ordem
=
"Corrida"
ELSE IF
RADIO_
OrdemImpressao
..
Value
=
3
Ordem
=
"CentroDeCusto"
ELSE IF
RADIO_
OrdemImpressao
..
Value
=
4
Ordem
=
"Embarque"
ELSE IF
RADIO_
OrdemImpressao
..
Value
=
5
Ordem
=
"RT"
ELSE
Ordem
=
"Funcionario"
END
ok
=
HExecuteQuery
(
QRY_
Select_FechamentoDetalhado
,
hQueryDefault
,
gn
ConvenioAdministrador
,
GloAno
,
GloNumFechamento
,
GloCentroCusto
,
Ordem
)
IF
ok
=
True
THEN
IF
CAB
=
0
THEN
CAB
=
1
Lineprint
=
"AnoFechamento;NumeroFechamento;CentroDeCusto;DesCentroDeCusto;Diretoria;ClienteConvenio;Corrida;DataHora;RT;Funcionario;Embarque;Desembarque;Finalidade;Km;Vouchers;Valor"
+
Charact
(
13
)
+
Charact
(
10
)
END
FOR EACH
QRY_
Select_FechamentoDetalhado
contador
+
=
1
Lineprint
+
=
QRY_
Select_FechamentoDetalhado.AnoFechamento
+
";"
Lineprint
+
=
QRY_
Select_FechamentoDetalhado.NumeroFechamento
+
";"
Lineprint
+
=
QRY_
Select_FechamentoDetalhado.Vouchers
+
";"
Lineprint
+
=
QRY_
Select_FechamentoDetalhado.Valor
+
Charact
(
13
)
+
Charact
(
10
)
END
END
//info(contador)
IF
ok
=
True
THEN
s
File is
string
s
File
=
WS_ReturnGenerationDir
(
)
+
"\FechamentoVoucher"
+
gn
ConvenioAdministrador
+
"_"
+
Numero_Ano
+
".xls"
IF
s
File
<
>
""
THEN
LooperToExcel
(
TABLE_
QRY_Select_FechamentoDetalhado
,
s
File
)
iDestination
(
iGenericXLS
,
s
File
)
FileDisplay
(
s
File
,
"application/unknown"
,
s
File
)
fDelete
(
s
File
)
END
END
END
Signaler
0
0
JOHNKEN
#3
Membre enregistré
26 messages
Posté le 26 juin 2015 - 15:44
Thanks Adriano,
LooperToExcel is not supported in android environment,
any other idea?
Signaler
0
0
Fabrice Harari
#4
Posté le 26 juin 2015 - 16:45
Hi Johnken,
excel is not natively supported in android, so you will have to choose
between 2 methods :
1. create a csv file instead (it's just text, and excel will read it easily)
2. Send your data to a webservice that you wan write in webdev awp by
example, and create the excel file there.
It all depends of what you are going to do with that file (I suppose
that you are going to SEND it somewhere aterwards, which could be done
by the webservice too)
Best regards
--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting
Already there: WXShowroom.com, WXReplication (open source)
Coming soon: WXEDM (open source)
More information on
http://www.fabriceharari.com
On 6/26/2015 7:44 AM, JOHNKEN wrote:
Thanks Adriano,
LooperToExcel is not supported in android environment,
any other idea?
Signaler
1
0
adrianoboller
#5
Membre enregistré
3 660 messages
Popularité : +175 (223 votes)
Posté le 26 juin 2015 - 17:45
Thank you very much Fabrice
Signaler
0
0
adrianoboller
#6
Membre enregistré
3 660 messages
Popularité : +175 (223 votes)
Posté le 26 juin 2015 - 17:48
JOHNKEN...
info(Lineprint)
Check the contents of lineprint before the party there that gave error ... this is a separate csv by semicolons. Save it with FsaveText on your sdcard or send direct via webservice as Fabrice gave hint.
Signaler
0
0
JOHNKEN
#7
Membre enregistré
26 messages
Posté le 27 juin 2015 - 01:46
Thanks Fabrice and Adriano,
I think csv file will do.
Signaler
0
0
→ Revenir à WINDEV Mobile 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