RDV+DIAL chat illimit� dans ta r�g!
no save
Assistance
Achat
News

Forum | programmation
Csharp et Excel
Kdior, le mar. 16 juin 2009 à 10:38:28
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";
}
}Configuration: Windows Vista
Firefox 3.0.11


Kdior
16 juin
Suivant
REPONSES
Kdior
16 juin
tresorunikin
13 oct.
Version Web
Réalisé par RedShift
no save