IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

MkFramework Discussion :

exportation d'un tableau de données en excel et génération d'un diagrame


Sujet :

MkFramework

  1. #21
    Rédacteur
    Avatar de imikado
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Décembre 2006
    Messages
    5 239
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France, Val de Marne (Île de France)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Finance

    Informations forums :
    Inscription : Décembre 2006
    Messages : 5 239
    Points : 19 100
    Points
    19 100
    Billets dans le blog
    17
    Par défaut
    Pour le fichier xls vide, il faudrait que vous postiez votre code, sinon on ne peut pas vous aider

    idem pour la question du preg_match

    verifier si numérique
    Code php : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    if( preg_match('/([0-9]*)/', $string )){
    //code numerique
    }


    verifier si alpha
    Code php : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    if( preg_match('/([a-zA-Z]*)/', $string )){
    //code numerique
    }
    Framework php sécurisé et simple à prendre en main avec générateur web http://mkframework.com/ (hebergé sur developpez.com)
    Mes cours/tutoriaux

  2. #22
    Futur Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Juin 2015
    Messages
    7
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 33
    Localisation : Autre

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juin 2015
    Messages : 7
    Points : 9
    Points
    9
    Par défaut TRI DANS UN TABLEAU AVEC 2 REFERENCES
    bonjour,
    je cherche à faire un tri sur 2 references. Avec la première, RRN, j'arrive à trier. je vais cependant ajouter un autre critère Q66 qui lui est une valeur alphanumerique. après 66 il ya des lettres que je vais prendre en consideration dans la selection
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
     
    <div class="row">
     
    	<form class="form-horizontal" action="" method="POST" name="auto">
    		<div class="col-sm-4">
    			<div class="form-group row">
                   <label class="col-sm-4 control-label">Filtre par Date</label>
    				<div class="col-sm-6">
    					<input class='form-control' name="date_jour" type='date'>
    				</div>
    			</div>
    			</div>
    		<div class="col-sm-4">
    			<div class="form-group row">
                   <label class="col-sm-4 control-label">Filtre par Mois</label>
    				<div class="col-sm-6">
    					<input class='form-control' name="date_mois" type='month'>
    				</div>
    			</div>
     
    		</div> 
    		<div class="col-sm-1">
     
    				<input class="btn" type="submit" name='proceed' value="Proceed">
    		</div>
    		<?php if(_root::getParam('proceed')!=NULL):?>
    		<div class="col-sm-1">
                 <a class="btn btn-success" href="<?php echo $this->getLink('download::index',array('date_jour'=>_root::getParam('date_jour'),'date_mois'=>_root::getParam('date_mois'),'proceed'=>_root::getParam('proceed')))?>">T&eacute;l&eacute;charger</a>
    		</div>
    		<?php endif;?>
    	</form>
    </div>
    <h5>
    	<b>DONNEES POUR : <?php if(_root::getParam('date_mois')!=NULL):echo _root::getParam('date_mois'); elseif(_root::getParam('date_jour')!=NULL):echo _root::getParam('date_jour');endif; ?></b>
    </h5>
    <table class="table table-striped table-condensed table-sm">
    	<tr>
     
     
    		<th>N&deg;</th>
    		<th>Date Op&eacute;ration</th>
     
    		<th>Libell&eacute;</th>
     
    		<th>Inst. Code</th>
     
    		<th>Date Valeur</th>
     
    		<th>Retrait</th>
     
    		<th>Dep&ocirc;t</th>
     
    		<th>solde</th>
     
    		<th></th>
    	</tr>
    	<?php if($this->tProofmaster):?>
     
    		<?php 
     
    		$tRRN=array();
    		$tQ66=array();
    		$model= ([[:alnum:]]);
    		$C=1;
    		$Retrait=0;
    		$Depot=0;
    		$Retrait1=0;
    		$Depot1=0;
    		foreach($this->tProofmaster as $oTProof):
     
    			$Ref_rrn=substr(strstr($oTProof->libelle,'RRN'),0,15);
    			$Ref_q66=substr(strstr($oTProof->libelle,'Q66'),0,15);
    			$Nbre=0;
     
     
    			if(strstr($oTProof->libelle,'RRN')==NULL);&& if (eregi($model, substr($Ref_q,2-3)):
     
    			$Retrait=$Retrait+$oTProof->retrait;
    			$Depot=$Depot+$oTProof->depot;
     
    			?>
     
    				<tr <?php echo plugin_tpl::alternate(array('','class="alt"'))?>>
     
     
    						<td><?php echo $C ?></td>
    						<td><?php echo $oTProof->date_operation ?></td>
     
    						<td><?php echo $oTProof->libelle ?></td>
     
    						<td><?php echo $oTProof->inst_code ?></td>
     
    						<td><?php echo $oTProof->date_valeur ?></td>
     
    						<td><?php echo $oTProof->retrait ?></td>
     
    						<td><?php echo $oTProof->depot ?></td>
     
    						<td><?php echo $oTProof->solde ?></td>
     
    							<td>
     
     
    								<a class="btn btn-default" href="<?php echo $this->getLink('proofmaster::show',array(
    														'id'=>$oTProof->getId()
    													) 
    											)?>">Show</a>
     
     
     
    							</td>
    				</tr>	
     
     
    			<?php 
     
    			elseif(!in_array($Ref_rrn,$tRRN)):
     
    				$Retrait1=$Retrait1+$oTProof->retrait;
    				$Depot1=$Depot1+$oTProof->depot;
    				foreach($this->tProofmaster as $oTProof2):
     
    					$tLibelle=explode(' ',$oTProof2->libelle);
    					if(in_array($Ref_rrn,$tLibelle)):
    							$Nbre++;
    					endif;
    				endforeach;
    				 // if($Nbre>=2 AND $Nbre<=10):
    				if($Nbre<=1):
    				?>
    				<tr <?php echo plugin_tpl::alternate(array('','class="alt"'))?>>
     
     
    					<td><?php echo $C ?></td>
    					<td><?php echo $oTProof->date_operation ?></td>
     
    					<td><?php echo $oTProof->libelle ?></td>
     
    					<td><?php echo $oTProof->inst_code ?></td>
     
    					<td><?php echo $oTProof->date_valeur ?></td>
     
    					<td><?php echo $oTProof->retrait ?></td>
     
    					<td><?php echo $oTProof->depot ?></td>
     
    					<td><?php echo $oTProof->solde ?></td>
     
    						<td>
     
     
    			<a class="btn btn-default" href="<?php echo $this->getLink('proofmaster::show',array(
    													'id'=>$oTProof->getId()
    												) 
    										)?>">Show</a>
     
     
     
    						</td>
    					</tr>	
     
    		<?php			//echo "<br>".$Ref_rrn."<br>".$Nbre."<br><br>";
    				endif;
    				//array_push($tRRN,$Ref_rrn);
    				array_push($tRRN,$Ref_rrn)&& array_push($tQ66,$Ref_q66);
     
    			endif;
     
    			$C++;
    		endforeach;?>
     
    		<tr>
    			<td colspan="5" style="text-align:right;font-size:bolder" >TOTAL TRANSACTIONS UNIQUES</td><td style="background-color:green;color:#fff;font-size:bolder" ><?php echo $Depot+$Depot1; ?></td><td style="background-color:brown;color:#fff;font-size:bolder"><?php echo $Retrait+$Retrait1; ?></td>
    			<td style="background-color:navy;color:#fff;font-size:bolder"><?php echo $Depot+$Depot1-($Retrait+$Retrait1); ?></td>
    		</tr>
    		<tr>
    			<td colspan="5" style="text-align:right;font-size:bolder" >TOTAL DES TRANSACTIONS</td>
    			<td style="background-color:green;color:#fff;font-size:bolder" ><?php foreach($this->tSumCredit as $oSumCredit): echo $oSumCredit->total;endforeach; ?></td>
    			<td style="background-color:green;color:#fff;font-size:bolder" ><?php foreach($this->tSumDebit as $oSumDebit): echo $oSumDebit->total;endforeach; ?></td>
     
    		</tr>
    	<?php else:?>
    		<tr>
    			<td colspan="9">Aucune donnée</td>
    		</tr>
    	<?php endif;?>
    </table>

  3. #23
    Rédacteur
    Avatar de imikado
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Décembre 2006
    Messages
    5 239
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France, Val de Marne (Île de France)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Finance

    Informations forums :
    Inscription : Décembre 2006
    Messages : 5 239
    Points : 19 100
    Points
    19 100
    Billets dans le blog
    17
    Par défaut
    Vous voulez faire un tri ?
    pourquio vous poster le contenu de votre vue (affichage) ?

    si vous souhaitez faire un tri, faites le plutot coté base de données
    Framework php sécurisé et simple à prendre en main avec générateur web http://mkframework.com/ (hebergé sur developpez.com)
    Mes cours/tutoriaux

+ Répondre à la discussion
Cette discussion est résolue.
Page 2 sur 2 PremièrePremière 12

Discussions similaires

  1. [AC-2010] Export d'un tableau croisé dynamique vers Excel
    Par AYARINHO dans le forum VBA Access
    Réponses: 3
    Dernier message: 30/06/2014, 14h33
  2. [CR ?] Export données pour Excel
    Par grom91 dans le forum SAP Crystal Reports
    Réponses: 5
    Dernier message: 20/06/2008, 12h05
  3. Réponses: 1
    Dernier message: 05/09/2006, 17h56
  4. exporter un tableau de donnée vers un document word
    Par demerzel0 dans le forum Access
    Réponses: 2
    Dernier message: 04/11/2005, 11h57
  5. Export de données vers Excel
    Par psykot63 dans le forum Access
    Réponses: 2
    Dernier message: 03/01/2005, 12h04

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo