salut salut,
lis ceci :
'http://support.microsoft.com/kb/320369
ca devrait resoudre ton probleme
ciao ciao
christophe
un bouillonnais
Anonymous wrote:Dans mon app (VB.net en Visual Studio2003), je dois ouvrir Excel puis transposer des datas depuis mon app vers Excel. En VB6 j'y arrivais sans pb mais en .net... j'arrive à ouvrir Excel mais pas un fichier. J'ai Excel 2003 installé sur ma machine (Windows XP SP2) J'ai donc mis les références : Microsoft Excel 11.0 Object Library et Microsoft Office 11.0 Object Library Voilà le code : ------------------------------------------------------------------------------- Private Sub uButExcelFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles uButExcelFile.Click Dim oXL As New Microsoft.Office.Interop.Excel.Application Dim oBook As Microsoft.Office.Interop.Excel.Workbook Try oXL.Visible = True oBook = oXL.Workbooks.Open("C:\_DEVINTERNE\CoilInteg\Prg\Guy\Loon\Loon\Templates\loonNet.xls") Catch ex As Exception System.Windows.Forms.MessageBox.Show(ex.ToString) If Not oXL Is Nothing Then oXL.Quit() oXL = Nothing ReleaseComObject(oXL) End If End Try End Sub ------------------------------------------------------------------------------------------- Chaque fois que je fais tourner, j'ouvre Excel, il devient visible mais dès qu'il arrive à la ligne oBook = oXl.workbooks.open(...) il lève une exception : "System.Runtime.InteropServices.ComException (0x80028018) : old format or invalid type library at Microsoft.office.Interop.excel.Workgroups.open(...)" Or je suis sûre d'avoir Excel 2003 (donc la library 11.0. Que manque-t-il ou qu'est ce qui est faux dans le code ??? Merci de votre aide. Angeljo
analyse mesure frequentation internet par Conditions d’utilisation et Copyright Respect de la vie privée