Skip to content

Commit

Permalink
changement du format d'écriture dans excel (#80)
Browse files Browse the repository at this point in the history
* changement du format d'écriture dans excel

* prévention panic quand l'activité !nafRev2

* fix: conversion de l'effectif en int pour liste

* fix: tester valeur libelle activite pour liste

Co-authored-by: fcoufour <[email protected]>
  • Loading branch information
chrnin and fcoufour authored May 31, 2021
1 parent dd4b3a2 commit 0ea8b34
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion follow.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,9 @@ func (follows Follows) toXLS() ([]byte, Jerror) {
row.AddCell().Value = ""
}
row.AddCell().Value = fmt.Sprintf("%s", *f.EtablissementSummary.CodeActivite)
row.AddCell().Value = fmt.Sprintf("%s", *f.EtablissementSummary.LibelleActivite)
if f.EtablissementSummary.LibelleActivite != nil {
row.AddCell().Value = fmt.Sprintf("%s", *f.EtablissementSummary.LibelleActivite)
}
row.AddCell().Value = fmt.Sprintf("%s", *coalescepString(f.EtablissementSummary.Alert, &EmptyString))
row.AddCell().Value = fmt.Sprintf("%s", *f.EtablissementSummary.Since)
row.AddCell().Value = fmt.Sprintf("%s", *f.EtablissementSummary.Category)
Expand Down
6 changes: 4 additions & 2 deletions score.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,11 @@ func (liste *Liste) toXLS(params paramsListeScores) ([]byte, Jerror) {
row.AddCell().Value = fmt.Sprintf("%s", score.Siret)
row.AddCell().Value = fmt.Sprintf("%s", *score.CodeDepartement)
row.AddCell().Value = fmt.Sprintf("%s", *score.RaisonSociale)
row.AddCell().Value = fmt.Sprintf("%f", *score.Effectif)
row.AddCell().Value = fmt.Sprintf("%d", int(*score.Effectif))
row.AddCell().Value = fmt.Sprintf("%s", *score.CodeActivite)
row.AddCell().Value = fmt.Sprintf("%s", *score.LibelleActivite)
if score.LibelleActivite != nil {
row.AddCell().Value = fmt.Sprintf("%s", *score.LibelleActivite)
}
row.AddCell().Value = fmt.Sprintf("%s", *score.Alert)
}

Expand Down

0 comments on commit 0ea8b34

Please sign in to comment.