Excel dans csharp Rechercher Remplacer ..

kdior Messages postés 22 Date d'inscription samedi 17 janvier 2009 Statut Membre Dernière intervention 16 juin 2009 - 15 juin 2009 à 17:50
kdior Messages postés 22 Date d'inscription samedi 17 janvier 2009 Statut Membre Dernière intervention 16 juin 2009 - 16 juin 2009 à 11:54
Bonjour,

 Je suis débutant en Csharp, j'ai crée une application Csharp  qui génère un fichier Excel.

je souhaiterai utiliser la fonction Rechercher et Remplacer  d'Excel via Csharp .

J'ai chercher sur le web mais je ne trouve vraiment rien .
je ne sais pas si c'est possible ?
Voici un bout de mon code :
Microsoft.Office.Interop.Excel.Application oXL;
        Microsoft.Office.Interop.Excel._Workbook oWB;
        Microsoft.Office.Interop.Excel._Worksheet oSheet;
        Microsoft.Office.Interop.Excel.Range oRng;
        object M = System.Reflection.Missing.Value;
       
        private void button1_Click_1(object sender, EventArgs e)
        {
            try
            {
                //Start Excel and get Application object.
                oXL = new Microsoft.Office.Interop.Excel.Application();
                oXL.Visible = true;

                //Get a new workbook.
                oWB = (Microsoft.Office.Interop.Excel._Workbook)(oXL.Workbooks.Add(System.Reflection.Missing.Value));
                oSheet = (Microsoft.Office.Interop.Excel._Worksheet)oWB.ActiveSheet;
               // Microsoft.Office.Interop.Excel.s
                //Add table headers going cell by cell.
                oSheet.Cells[1, 1] = "First Name";
                oSheet.Cells[1, 2] = "Last Name";
                oSheet.Cells[1, 3] = "Full Name";
           }
   }

1 réponse

kdior Messages postés 22 Date d'inscription samedi 17 janvier 2009 Statut Membre Dernière intervention 16 juin 2009 1
16 juin 2009 à 11:54
Personne ?????
0
Rejoignez-nous