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

avec Java Discussion :

manipuler une chaine de caractère


Sujet :

avec Java

  1. #1
    Futur Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Décembre 2014
    Messages
    12
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Maroc

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Décembre 2014
    Messages : 12
    Points : 8
    Points
    8
    Par défaut manipuler une chaine de caractère
    bonjour
    je ne sais pas comment stocker la chaine dans le fichier et merci pour votre aide
    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
    import java.io.BufferedWriter;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.FileWriter;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.PrintWriter;
    import java.util.Arrays;
    import java.util.Iterator;
     
    import org.apache.poi.hssf.usermodel.HSSFRow;
    import org.apache.poi.hssf.usermodel.HSSFSheet;
    import org.apache.poi.hssf.usermodel.HSSFWorkbook;
    import org.apache.poi.poifs.filesystem.POIFSFileSystem;
    import org.apache.poi.ss.usermodel.Cell;
    import org.apache.poi.ss.usermodel.Row;
    import org.apache.poi.ss.usermodel.Sheet;
    import org.apache.poi.ss.usermodel.Workbook;
    import org.apache.poi.ss.usermodel.WorkbookFactory;
    import org.apache.poi.ss.util.CellReference;
    import org.apache.poi.hssf.usermodel.HSSFCell;
    public class Readxls {
     
    public static void main(String[] args) throws FileNotFoundException  {
     
    	try {
     
    	    InputStream input=new FileInputStream("C:\\classeur1.xls");
    	    HSSFWorkbook wb = new HSSFWorkbook(input);
     
    	    HSSFSheet sheet = wb.getSheetAt(0);
     
     
    	    Iterator<Row> rowIterator = (sheet).rowIterator();
    	    while(rowIterator.hasNext()) {
    	        HSSFRow row = (HSSFRow) rowIterator.next();
     
    	        Iterator<Cell> cellIterator = row.cellIterator();
    	        while(cellIterator.hasNext()) {
     
     
    	        	 File fil =new File ("t4.txt");
    	   		  try {
    	   			FileWriter fw = new FileWriter (fil);
    	   			BufferedWriter bw = new BufferedWriter (fw);
    	   			PrintWriter fichierSortie = new PrintWriter (bw);
     
     
     
    	            HSSFCell cell = (HSSFCell) cellIterator.next();
    	            String[] values = new String[row.getPhysicalNumberOfCells()];
     
    	             int i=0 ;
    	            switch(cell.getCellType()) {
    	            case Cell.CELL_TYPE_BLANK:
    	            	System.out.print(" "+";");
    	            	fichierSortie.println (" "+";");
    	            	break;
    	                case Cell.CELL_TYPE_BOOLEAN:
    	                    System.out.print(cell.getBooleanCellValue() + ";");
    	                    break;
    	                case Cell.CELL_TYPE_NUMERIC:
    	                   // System.out.print(cell.getNumericCellValue() + ";");
    	                    values[i++]=Integer.toString((int) cell.getNumericCellValue());
    	                    System.out.print(values[0]+";");
    	                    fichierSortie.println (values[0]+";");
    	                    break;
    	                case Cell.CELL_TYPE_STRING:
    	                    //System.out.print(cell.getStringCellValue() + ";");
    	                   values[i++] = cell.getStringCellValue();
    	                   System.out.print(values[0]+";");
    	                   fichierSortie.println (values[0]+";");
    	                    break;
    	            } fichierSortie.close();}
     
    				  catch (Exception e){
    						System.out.println(e.toString());
    			        System.out.println("");
    			    }}
    	         //creation et ecriture dans le fichier
    			/*File fil =new File ("t4.txt");
    			  try {
    				FileWriter fw = new FileWriter (fil);
    				BufferedWriter bw = new BufferedWriter (fw);
    				PrintWriter fichierSortie = new PrintWriter (bw);
     
    				fichierSortie.println ( values[0]);  
    				fichierSortie.close();}
    				//System.out.println("Le fichier " + fil + " a été créé!"); 
     
    			catch (Exception e){
    				System.out.println(e.toString());
    	        System.out.println("");
    	    }*/
     
     
    	        System.out.println("");
    	        }}
    	catch (FileNotFoundException e) {
    	    //e.printStackTrace();
    		 System.out.println(e.toString());
    	} catch (IOException e) {
    		e.printStackTrace();
    	}
    	}}

  2. #2
    Modérateur

    Homme Profil pro
    Développeur java, access, sql server
    Inscrit en
    Octobre 2005
    Messages
    2 711
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val de Marne (Île de France)

    Informations professionnelles :
    Activité : Développeur java, access, sql server
    Secteur : Industrie

    Informations forums :
    Inscription : Octobre 2005
    Messages : 2 711
    Points : 4 797
    Points
    4 797
    Par défaut
    Ben déjà, tu ouvres le fichier à chaque itération :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
     
    	        while(cellIterator.hasNext()) {
     
     
    	        	 File fil =new File ("t4.txt");
    ça ne peut pas marcher
    Il faut mettre ton ouverture de fichier AVANT le while
    Labor improbus omnia vincit un travail acharné vient à bout de tout - Ambroise Paré (1510-1590)

    Consulter sans modération la FAQ ainsi que les bons ouvrages : http://jmdoudoux.developpez.com/cours/developpons/java/

  3. #3
    Futur Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Décembre 2014
    Messages
    12
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Maroc

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Décembre 2014
    Messages : 12
    Points : 8
    Points
    8
    Par défaut
    merci pour la réponse mais cela n'a rien changé

  4. #4
    Modérateur

    Homme Profil pro
    Développeur java, access, sql server
    Inscrit en
    Octobre 2005
    Messages
    2 711
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val de Marne (Île de France)

    Informations professionnelles :
    Activité : Développeur java, access, sql server
    Secteur : Industrie

    Informations forums :
    Inscription : Octobre 2005
    Messages : 2 711
    Points : 4 797
    Points
    4 797
    Par défaut
    cela n'a rien changé
    c'est vague

    Et si tu me disais exactement ce qui ne fonctionne pas ?
    ex :
    - le fichier est vide
    - le programme plante à la ligne n°..
    - etc.
    Labor improbus omnia vincit un travail acharné vient à bout de tout - Ambroise Paré (1510-1590)

    Consulter sans modération la FAQ ainsi que les bons ouvrages : http://jmdoudoux.developpez.com/cours/developpons/java/

  5. #5
    Futur Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Décembre 2014
    Messages
    12
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Maroc

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Décembre 2014
    Messages : 12
    Points : 8
    Points
    8
    Par défaut
    je n'obtient qu'une seule cellule du fichier

  6. #6
    Modérateur

    Homme Profil pro
    Développeur java, access, sql server
    Inscrit en
    Octobre 2005
    Messages
    2 711
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val de Marne (Île de France)

    Informations professionnelles :
    Activité : Développeur java, access, sql server
    Secteur : Industrie

    Informations forums :
    Inscription : Octobre 2005
    Messages : 2 711
    Points : 4 797
    Points
    4 797
    Par défaut
    Je n'avais pas vu que tu as 2 boucles while.

    Il faut mettre ton ouverture de fichier au début du programme avant le 1er while
    et fermer ton fichier APRES cette boucle
    Labor improbus omnia vincit un travail acharné vient à bout de tout - Ambroise Paré (1510-1590)

    Consulter sans modération la FAQ ainsi que les bons ouvrages : http://jmdoudoux.developpez.com/cours/developpons/java/

  7. #7
    Futur Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Décembre 2014
    Messages
    12
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Maroc

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Décembre 2014
    Messages : 12
    Points : 8
    Points
    8
    Par défaut
    oui c'est ce que j'ai fais mais j'obtient le même résultat
    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
    import java.io.BufferedWriter;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.FileWriter;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.PrintWriter;
    import java.util.Arrays;
    import java.util.Iterator;
     
    import org.apache.poi.hssf.usermodel.HSSFRow;
    import org.apache.poi.hssf.usermodel.HSSFSheet;
    import org.apache.poi.hssf.usermodel.HSSFWorkbook;
    import org.apache.poi.poifs.filesystem.POIFSFileSystem;
    import org.apache.poi.ss.usermodel.Cell;
    import org.apache.poi.ss.usermodel.Row;
    import org.apache.poi.ss.usermodel.Sheet;
    import org.apache.poi.ss.usermodel.Workbook;
    import org.apache.poi.ss.usermodel.WorkbookFactory;
    import org.apache.poi.ss.util.CellReference;
    import org.apache.poi.hssf.usermodel.HSSFCell;
    public class Readxls {
     
    public static void main(String[] args) throws FileNotFoundException  {
     
    	try {
     
    	    InputStream input=new FileInputStream("C:\\classeur1.xls");
    	    HSSFWorkbook wb = new HSSFWorkbook(input);
     
    	    HSSFSheet sheet = wb.getSheetAt(0);
     
     
    	    Iterator<Row> rowIterator = (sheet).rowIterator();
    	    File fil =new File ("t4.txt");
     
    	    while(rowIterator.hasNext()) {
    	        HSSFRow row = (HSSFRow) rowIterator.next();
     
    	        Iterator<Cell> cellIterator = row.cellIterator();
     
    	        while(cellIterator.hasNext()) {
     
    	        	 try {
    	        			FileWriter fw = new FileWriter (fil);
    	        			BufferedWriter bw = new BufferedWriter (fw);
    	        			PrintWriter fichierSortie = new PrintWriter (bw);
     
     
     
     
     
    	            HSSFCell cell = (HSSFCell) cellIterator.next();
    	            String[] values = new String[row.getPhysicalNumberOfCells()];
     
    	             int i=0 ;
    	            switch(cell.getCellType()) {
    	            case Cell.CELL_TYPE_BLANK:
    	            	System.out.print(" "+";");
    	            	fichierSortie.println (" "+";");
    	            	break;
    	                case Cell.CELL_TYPE_BOOLEAN:
    	                    System.out.print(cell.getBooleanCellValue() + ";");
    	                    break;
    	                case Cell.CELL_TYPE_NUMERIC:
    	                   // System.out.print(cell.getNumericCellValue() + ";");
    	                    values[i++]=Integer.toString((int) cell.getNumericCellValue());
    	                    System.out.print(values[0]+";");
    	                    fichierSortie.println (values[0]+";");
    	                    break;
    	                case Cell.CELL_TYPE_STRING:
    	                    //System.out.print(cell.getStringCellValue() + ";");
    	                   values[i++] = cell.getStringCellValue();
    	                   System.out.print(values[0]+";");
    	                   fichierSortie.println (values[0]+";");
    	                    break;
    	            } fichierSortie.close();}
     
    				  catch (Exception e){
    						System.out.println(e.toString());
    			        System.out.println("");
    			    }}
    	         //creation et ecriture dans le fichier
    			/*File fil =new File ("t4.txt");
    			  try {
    				FileWriter fw = new FileWriter (fil);
    				BufferedWriter bw = new BufferedWriter (fw);
    				PrintWriter fichierSortie = new PrintWriter (bw);
     
    				fichierSortie.println ( values[0]);  
    				fichierSortie.close();}
    				//System.out.println("Le fichier " + fil + " a été créé!"); 
     
    			catch (Exception e){
    				System.out.println(e.toString());
    	        System.out.println("");
    	    }*/
     
     
    	        System.out.println("");
    	        }}
    	catch (FileNotFoundException e) {
    	    //e.printStackTrace();
    		 System.out.println(e.toString());
    	} catch (IOException e) {
    		e.printStackTrace();
    	}
    	}}

  8. #8
    Modérateur

    Homme Profil pro
    Développeur java, access, sql server
    Inscrit en
    Octobre 2005
    Messages
    2 711
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val de Marne (Île de France)

    Informations professionnelles :
    Activité : Développeur java, access, sql server
    Secteur : Industrie

    Informations forums :
    Inscription : Octobre 2005
    Messages : 2 711
    Points : 4 797
    Points
    4 797
    Par défaut
    Mais non !
    tu dois mettre toute l'ouverture AVANT la boucle.
    L'ouverture c'est :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    File fil =new File ("t4.txt");
    FileWriter fw = new FileWriter (fil);
    BufferedWriter bw = new BufferedWriter (fw);
    PrintWriter fichierSortie = new PrintWriter (bw);
    Ensuite ta fermeture APRES la boucle :
    ta fermeture c'est :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    fichierSortie.close();
    il faut la mettre juste avant le
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    } catch (FileNotFoundException e) {

    Le problème de ton code c'est qu'il ouvre et ferme le fichier à chaque cellule
    et donc ça détruit le fichier à chaque fois pour ne garder que le dernier !!!!
    Labor improbus omnia vincit un travail acharné vient à bout de tout - Ambroise Paré (1510-1590)

    Consulter sans modération la FAQ ainsi que les bons ouvrages : http://jmdoudoux.developpez.com/cours/developpons/java/

  9. #9
    Futur Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Décembre 2014
    Messages
    12
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Maroc

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Décembre 2014
    Messages : 12
    Points : 8
    Points
    8
    Par défaut
    merci pour votre réponse je retrouve comme résultat une ligne dans le fichier

  10. #10
    Modérateur

    Homme Profil pro
    Développeur java, access, sql server
    Inscrit en
    Octobre 2005
    Messages
    2 711
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val de Marne (Île de France)

    Informations professionnelles :
    Activité : Développeur java, access, sql server
    Secteur : Industrie

    Informations forums :
    Inscription : Octobre 2005
    Messages : 2 711
    Points : 4 797
    Points
    4 797
    Par défaut
    C'était le résultat attendu ?
    Labor improbus omnia vincit un travail acharné vient à bout de tout - Ambroise Paré (1510-1590)

    Consulter sans modération la FAQ ainsi que les bons ouvrages : http://jmdoudoux.developpez.com/cours/developpons/java/

  11. #11
    Futur Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Décembre 2014
    Messages
    12
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Maroc

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Décembre 2014
    Messages : 12
    Points : 8
    Points
    8
    Par défaut
    non voila le nouveau code
    le fichier excel que je veux traiter Classeur1.xls
    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
    import java.io.BufferedWriter;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileWriter;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.PrintWriter;
    import java.util.Iterator;
     
    import org.apache.poi.hssf.usermodel.HSSFRow;
    import org.apache.poi.hssf.usermodel.HSSFSheet;
    import org.apache.poi.hssf.usermodel.HSSFWorkbook;
    import org.apache.poi.ss.usermodel.Cell;
    import org.apache.poi.ss.usermodel.Row;
    import org.apache.poi.ss.usermodel.Workbook;
    import org.apache.poi.ss.usermodel.WorkbookFactory;
    import org.apache.poi.ss.util.CellReference;
    import org.apache.poi.hssf.usermodel.HSSFCell;
    public class Readxls {
     
    public static void main(String[] args) throws FileNotFoundException  {
     
    	try {
     
    	    InputStream input=new FileInputStream("C:\\classeur1.xls");
    	    HSSFWorkbook wb = new HSSFWorkbook(input);
     
    	    HSSFSheet sheet = wb.getSheetAt(0);
     
     
    	    Iterator<Row> rowIterator = (sheet).rowIterator();
    	    File fil =new File ("t4.txt");
    	    try {
    			FileWriter fw = new FileWriter (fil);
    			BufferedWriter bw = new BufferedWriter (fw);
    			PrintWriter fichierSortie = new PrintWriter (bw);
     
    	    while(rowIterator.hasNext()) {
    	        HSSFRow row = (HSSFRow) rowIterator.next();
     
    	        Iterator<Cell> cellIterator = row.cellIterator();
     
    	        while(cellIterator.hasNext()) {
     
     
    	           HSSFCell cell = (HSSFCell) cellIterator.next();
    	            String[] values = new String[row.getPhysicalNumberOfCells()];
     
    	             int i=0 ;
    	            switch(cell.getCellType()) {
    	            case Cell.CELL_TYPE_BLANK:
    	            	System.out.print(" "+";");
    	            	fichierSortie.println (" "+";");
    	            	break;
    	                case Cell.CELL_TYPE_BOOLEAN:
    	                    System.out.print(cell.getBooleanCellValue() + ";");
    	                    break;
    	                case Cell.CELL_TYPE_NUMERIC:
    	                   // System.out.print(cell.getNumericCellValue() + ";");
    	                    values[i++]=Integer.toString((int) cell.getNumericCellValue());
    	                    System.out.print(values[0]+";");
    	                    fichierSortie.println (values[0]+";");
    	                    break;
    	                case Cell.CELL_TYPE_STRING:
    	                    //System.out.print(cell.getStringCellValue() + ";");
    	                   values[i++] = cell.getStringCellValue();
    	                   System.out.print(values[0]+";");
    	                   fichierSortie.println (values[0]+";");
    	                    break;
    	            }  
    	    }System.out.println("");
    	    fichierSortie.close();
     
    	    }}catch (FileNotFoundException e) {
    	    	System.out.println(e.toString());
     
            System.out.println("");
    	    }  
     
     
     
     
    	        }
    	catch (FileNotFoundException e) {
    	    //e.printStackTrace();
    		 System.out.println(e.toString());
    	} catch (IOException e) {
    		e.printStackTrace();
    	}
    }}

  12. #12
    Modérateur

    Homme Profil pro
    Développeur java, access, sql server
    Inscrit en
    Octobre 2005
    Messages
    2 711
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val de Marne (Île de France)

    Informations professionnelles :
    Activité : Développeur java, access, sql server
    Secteur : Industrie

    Informations forums :
    Inscription : Octobre 2005
    Messages : 2 711
    Points : 4 797
    Points
    4 797
    Par défaut
    Le "fichierSortie.close();" est encore mal placé.

    N'oublie pas qu'il sert à refermer le fichier !

    A l'endroit où il est, il ferme à chaque changement de ligne du tableau Excel

    donc il faut le mettre APRES la dernière boucle.
    Dans ton programme c'est après la ligne 84
    Labor improbus omnia vincit un travail acharné vient à bout de tout - Ambroise Paré (1510-1590)

    Consulter sans modération la FAQ ainsi que les bons ouvrages : http://jmdoudoux.developpez.com/cours/developpons/java/

  13. #13
    Futur Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Décembre 2014
    Messages
    12
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Maroc

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Décembre 2014
    Messages : 12
    Points : 8
    Points
    8
    Par défaut
    ah oui merci beaucoup pour votre aide
    j'ai une autre question si vous le permettez j'aimerais bien insérer chaque ligne du fichier excel dans une ligne du fichier texte

  14. #14
    Modérateur

    Homme Profil pro
    Développeur java, access, sql server
    Inscrit en
    Octobre 2005
    Messages
    2 711
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val de Marne (Île de France)

    Informations professionnelles :
    Activité : Développeur java, access, sql server
    Secteur : Industrie

    Informations forums :
    Inscription : Octobre 2005
    Messages : 2 711
    Points : 4 797
    Points
    4 797
    Par défaut
    Ah oui, parce que toutes les valeurs sont écrites "les unes en dessous des autres" ?

    tu dois utiliser :

    fichierSortie.print quand les valeurs doivent être écrites les unes derrières les autres
    fichierSortie.println quand tu veux que la valeur soit écrite PUIS ajoute un retour chariot (saut de ligne) après
    Labor improbus omnia vincit un travail acharné vient à bout de tout - Ambroise Paré (1510-1590)

    Consulter sans modération la FAQ ainsi que les bons ouvrages : http://jmdoudoux.developpez.com/cours/developpons/java/

  15. #15
    Futur Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Décembre 2014
    Messages
    12
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Maroc

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Décembre 2014
    Messages : 12
    Points : 8
    Points
    8
    Par défaut
    je vous remercie infiniment pour votre aide

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [MySQL] Manipulation d'une chaine de caractère.
    Par Tanoak_LaCapuche dans le forum PHP & Base de données
    Réponses: 4
    Dernier message: 23/07/2012, 09h01
  2. Réponses: 13
    Dernier message: 12/07/2012, 11h13
  3. Manipuler une chaine de caractère.
    Par jamsgoodon dans le forum Débuter
    Réponses: 1
    Dernier message: 14/04/2011, 19h56
  4. Comment manipuler une chaine de caractère
    Par belmehdi17 dans le forum Débuter avec Java
    Réponses: 2
    Dernier message: 11/03/2008, 16h03
  5. Manipulation de chaine de caractères, supression d'une apostrophe
    Par pmithrandir dans le forum Scripts/Batch
    Réponses: 6
    Dernier message: 28/11/2007, 07h55

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