Oui je sais mais on m'a imposé le format java...
Je donne un apercu de mon code pour la création du fichier excel mais ca ne fonctionne pas.
Je ne comprend pas pourquoi.
package automatisation;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Iterator;
import org.apache.poi.xssf.usermodel.XSSFCell;
import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
public class Compteur{
public static void main(String[] args) {
String excelFileName = "D/Test.xlsx";
//Création du document excel vierge
XSSFWorkbook wb = new XSSFWorkbook();
// Creer la feuille
XSSFSheet Feuille1 = wb.createSheet("liste des compteurs");
//Créer une ligne et la renseigner
XSSFRow row = Feuille1.createRow((short)0);
//Création d'une nouvelle cellule
XSSFCell cellule = row.createCell(0);
cellule.setCellValue(1.2);;
FileOutputStream fileOut;
try{
fileOut = new FileOutputStream(excelFileName);
wb.write(fileOut);
fileOut.flush();
fileOut.close();
} catch (FileNotFoundException e){
e.printStackTrace();
} catch(IOException e){
e.printStackTrace();
}
}
}
Si vous pouviez m'aiguiller juste pour la création du excel.