Convertir une cellule d une fichier excel en String
meriama_s
Messages postés99Date d'inscriptionjeudi 13 octobre 2005StatutMembreDernière intervention20 août 2008
-
20 août 2008 à 16:22
WishhhMaster
Messages postés327Date d'inscriptionmardi 17 février 2004StatutMembreDernière intervention10 avril 2010
-
20 août 2008 à 22:40
Bonjour,
je veux afficher le contenu d une cellule d un fichier excel dans ma console mais j arrive pas, voila mon code, j ai besoin de convertir les cellule en String, comment faire??
voila mon code
<!-- BEGIN TEMPLATE: bbcode_code -->
Code :
String patch = "C:\\data\\passeWord.xls";
Object M=System.Reflection.Missing.Value;
Microsoft.Office.Interop.Excel.Application xlsApplication;
Microsoft.Office.Interop.Excel.Workbook xlsWorkbook;
Microsoft.Office.Interop.Excel.Worksheet xlsWorksheet;
xlsApplication = new Microsoft.Office.Interop.Excel.Application();
xlsWorkbook = xlsApplication.Workbooks.Open(patch, M, M, M, M, M, M, M, M, M, M, M, M, M, M);
xlsWorksheet = (Worksheet)xlsWorkbook.ActiveSheet;
String xlsPW = xlsWorksheet.Cells[1, 1];
Console.WriteLine(xlsPW);