Canalblog
Suivre ce blog Administration + Créer mon blog

Deux ou trois choses que je sais d'elle

24 mai 2016

Tableau - World Temperatures

 

Tableau-Visualization Course Assignment

Publicité
Publicité
23 mai 2016

Assignment 1 - Average World Temperatures

10 juillet 2015

Waiting for KSTAR

WaitingforKSTAR

10 juin 2015

brand classification - ON STRATEGY - WHAT PHILOSOPHY CAN LEARN TO MANAGERS - 1

Classification

8 novembre 2012

Télérama - article

article_T_l_rama2

Publicité
Publicité
7 novembre 2012

Prisma TV

As a journalist for Prisma Press and more precisely in the Tv unit, I wrote many articles on series (Frasier, Double_vie_de_Carol, Trois_hommes_sur_le_green, L_univers_du_rock, Comic_Trip, Des_enquêtes à_clés_musicales, Dream_on, Sex_in_the_City), on documentaries (Découvrez_les_stars_chez_elle, Serial_kisser, Campagne électorale, Danielle_Darrieux) and live or recorded broadcasting (Dechavanne, En_route_avec_les_stars).

You could read that my articles covered a broad-range of subjects : people, animal, psychology, social life, music ...

Thank you in advance for your attention.

21 septembre 2012

exporter vers un CSV, en utilisant les fonctions PHP

Pour exporter vers un CSV, en utilisant les fonctions PHP

fopen(), fputs() et fclose()

 

Tu peux faire comme suit

$fichier = 'CHEMIN_VERS_TON_FICHIER/NOM_DE_TON_FICHIER.csv';

$ton_fichier = fopen($fichier, 'w') or die("can't open file");
// le deuxième paramètres 'w' est important pour la création du fichier s'il n'existe pas

// Insertion du header, colonnes séparées par des virgules
// comme indiqué dans la question que tes données sont dans des tableaux)

$header_to_insert = implode(',', $header);
fputs($ton_fichier, $header_to_insert);
fclose($ton_fichier);

// Insertion des lignes du tableau

foreach ($rows as $row){

$fh = fopen($ton_fichier, 'a') or die("can't open file");
// le deuxième paramètres 'a' ouvre le fichier en mode écriture

$row_to_insert = implode(',', $row);
fputs($ton_fichier, "\r\n".$row_to_insert);
fclose($ton_fichier)
21 septembre 2012

How do I export html table data as .csv file?

   
   
 

For exporting html to csv try following this example. More details and examples are available at the author's website.

Create a html2csv.js file and put the following code in it.

jQuery.fn.table2CSV = function(options) {
   
var options = jQuery.extend({
        separator
: ',',
        header
: [],
        delivery
: 'popup' // popup, value
   
},
    options
);

   
var csvData = [];
   
var headerArr = [];
   
var el = this;

   
//header
   
var numCols = options.header.length;
   
var tmpRow = []; // construct header avalible array

   
if (numCols > 0) {
       
for (var i = 0; i < numCols; i++) {
            tmpRow
[tmpRow.length] = formatData(options.header[i]);
       
}
   
} else {
        $
(el).filter(':visible').find('th').each(function() {
           
if ($(this).css('display') != 'none') tmpRow[tmpRow.length] = formatData($(this).html());
       
});
   
}

    row2CSV
(tmpRow);

   
// actual data
    $
(el).find('tr').each(function() {
       
var tmpRow = [];
        $
(this).filter(':visible').find('td').each(function() {
           
if ($(this).css('display') != 'none') tmpRow[tmpRow.length] = formatData($(this).html());
       
});
        row2CSV
(tmpRow);
   
});
   
if (options.delivery == 'popup') {
       
var mydata = csvData.join('\n');
       
return popup(mydata);
   
} else {
       
var mydata = csvData.join('\n');
       
return mydata;
   
}

   
function row2CSV(tmpRow) {
       
var tmp = tmpRow.join('') // to remove any blank rows
       
// alert(tmp);
       
if (tmpRow.length > 0 && tmp != '') {
           
var mystr = tmpRow.join(options.separator);
            csvData
[csvData.length] = mystr;
       
}
   
}
   
function formatData(input) {
       
// replace " with “
       
var regexp = new RegExp(/["]/g);
       
var output = input.replace(regexp, "“");
       
//HTML
       
var regexp = new RegExp(/\<[^\<]+\>/g);
       
var output = output.replace(regexp, "");
       
if (output == "") return '';
       
return '"' + output + '"';
   
}
   
function popup(data) {
       
var generator = window.open('', 'csv', 'height=400,width=600');
        generator
.document.write('CSV');
        generator
.document.write('
'
);
        generator
.document.write(');
        generator
.document.write(data);
        generator
.document.write('');
        generator
.document.write('');
        generator
.document.close();
       
return true;
   
}
};

include the js files into the html page like this:

<script type="text/javascript" src="jquery-1.3.2.js" >

<script type="text/javascript" src="html2CSV.js" >

TABLE:

<table id="example1" border="1"  style="background-color:#FFFFCC" width="0%" cellpadding="3" cellspacing="3">

   


       
   

EXPORT BUTTON:

<input value="Export as CSV 2" type="button" onclick="$('#example1').table2CSV({header:['prefix','Employee Name','Contact']})">
share|improve this answer
 
   
   
1  
 
feedback
 
   
 
   
   
   
21 septembre 2012

copie écran mac sous windows XP

Pour faire une impression ecran sous windows XP avec Bootcamp

il faut faire fn+maj+F11

sinon sur mac

Pour effectuer une capture de la totalité de l'écran, appuyez sur Commande + Maj + 3.

Pour effectuer une capture d'une partie de l'écran, appuyez sur Commande + Maj + 4, puis faites glisser le pointeur pour sélectionner la zone à capturer.

1 juin 2012

Communication CJC - Montpellier - 9-10/6

Montpellier-Présentation

Publicité
Publicité
1 2 > >>
Deux ou trois choses que je sais d'elle
Publicité
Archives
Publicité