Ecrire dans un fichier Excel
Bonjour,
Je developpe une application en delphi prism sur visual studio 2008 et je souhaiterai lire et ecrire dans un fichier excel.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
method fm_assistant.Button13_Click(sender: System.Object; e: System.EventArgs);
var
oXL : Microsoft.Office.Interop.Excel.Application;
oWB : Microsoft.Office.Interop.Excel._Workbook;
oSheet : Microsoft.Office.Interop.Excel._Worksheet;
begin
//Start Excel and get Application object.
oXL := new Microsoft.Office.Interop.Excel.Application();
oXL.Visible := False;
//Get a new workbook.
oWB := oXL.Workbooks.Add(System.Reflection.Missing.Value);
oSheet := Microsoft.Office.Interop.Excel._Worksheet(oWB.ActiveSheet);
..... |
Mais j'ai message d'erreur: Microsoft.Office.Interop.Excel.Application est une interface et ne peut pas être instanciée
Aurez vous des reponse a ce sujet?
Merci!