IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

VB.NET Discussion :

Exception : 0x80010105 sur creation d'un chart [Débutant]


Sujet :

VB.NET

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre averti
    Profil pro
    Inscrit en
    Avril 2011
    Messages
    31
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2011
    Messages : 31
    Par défaut Exception : 0x80010105 sur creation d'un chart
    Bonjour,

    J'ai réaliser une bout de code en vb pour exporter des valeurs vb vers Excel. J'ai tester cela sur mon ordinateur ça marche parfaitement mais lorsque je le lance sur un autre pc avec une version d'Excel plus récente cela me met une exception 0x80010105.

    Le code :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
     xlCharts = excelWorksheet2.ChartObjects
     msgbox("1")
                myChart = xlCharts.Add(0, 0, 600, 450)
     msgbox("2")
                chartPage = myChart.Chart
     msgbox("3")
                chartRange = excelWorksheet.Range(excelWorksheet.Cells(1, 3), excelWorksheet.Cells(rowsTotal + 1, colsTotal + 1))
     msgbox("4")
                chartPage.SetSourceData(Source:=chartRange, PlotBy:=Microsoft.Office.Interop.Excel.XlRowCol.xlColumns)
    J'ai mis des msgbox pour tester et voir quand cela plante exactement et la messagebox ("1") apparait et l'exception apparait juste apres.

    Et juste avant :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
     
                excelWorksheet2.Select()
                With excelWorksheet2
                    .Cells.Select()
                    .Cells.Borders(Microsoft.Office.Interop.Excel.XlBordersIndex.xlInsideHorizontal).ColorIndex = 2
                    .Cells.Borders(Microsoft.Office.Interop.Excel.XlBordersIndex.xlInsideVertical).ColorIndex = 2
                    .Name = "Graphe"
                End With
    Ce code est beaucoup plus long à s'exécuter que normalement.




    Mon exception :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
     
    See the end of this message for details on invoking 
    just-in-time (JIT) debugging instead of this dialog box.
     
    ************** Exception Text **************
    System.Runtime.InteropServices.COMException (0x80010105): The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))
       at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
       at Microsoft.Office.Interop.Excel.ChartObjects.Add(Double Left, Double Top, Double Width, Double Height)
       at WindowsApplication1.graph_data.export(String& cyclename, String& cycleshort, String& axe) in C:\Documents and Settings\AUDUSER.FRLT132375\Bureau\dAVID\GAT_EX_vb2010\GatherPmac_exemple\graph_data.vb:line 378
       at WindowsApplication1.Form2.Button4_Click(Object sender, EventArgs e) in C:\Documents and Settings\AUDUSER.FRLT132375\Bureau\dAVID\GAT_EX_vb2010\GatherPmac_exemple\Form2.vb:line 974
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
     
     
    ************** Loaded Assemblies **************
    mscorlib
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
        CodeBase: file:///E:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
    ----------------------------------------
    GatherPmac_exemple
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file:///G:/dAVID/GAT_EX_vb2010/GatherPmac_exemple/bin/Release/GatherPmac_exemple.exe
    ----------------------------------------
    Microsoft.VisualBasic
        Assembly Version: 10.0.0.0
        Win32 Version: 10.0.30319.1 built by: RTMRel
        CodeBase: file:///E:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
    ----------------------------------------
    System
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 built by: RTMRel
        CodeBase: file:///E:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Core
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 built by: RTMRel
        CodeBase: file:///E:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
    ----------------------------------------
    System.Windows.Forms
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 built by: RTMRel
        CodeBase: file:///E:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System.Drawing
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 built by: RTMRel
        CodeBase: file:///E:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System.Runtime.Remoting
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
        CodeBase: file:///E:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
    ----------------------------------------
    System.Windows.Forms.DataVisualization
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1
        CodeBase: file:///E:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.DataVisualization/v4.0_4.0.0.0__31bf3856ad364e35/System.Windows.Forms.DataVisualization.dll
    ----------------------------------------
    System.Data
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
        CodeBase: file:///E:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
    ----------------------------------------
    System.Xml
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 built by: RTMRel
        CodeBase: file:///E:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    Microsoft.Office.Interop.Excel
        Assembly Version: 12.0.0.0
        Win32 Version: 12.0.4518.1014
        CodeBase: file:///E:/WINDOWS/assembly/GAC/Microsoft.Office.Interop.Excel/12.0.0.0__71e9bce111e9429c/Microsoft.Office.Interop.Excel.dll
    ----------------------------------------
    office
        Assembly Version: 12.0.0.0
        Win32 Version: 12.0.4518.1014
        CodeBase: file:///E:/WINDOWS/assembly/GAC/office/12.0.0.0__71e9bce111e9429c/office.dll
    ----------------------------------------
     
    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.
     
    For example:
     
    <configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>
     
    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.
    Si quelqu'un peut m'aider

    Cordialement


    Visual Studio 2010 express

  2. #2
    Membre éclairé Avatar de anasschiguer
    Homme Profil pro
    Étudiant
    Inscrit en
    Juillet 2013
    Messages
    35
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Canada

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Finance

    Informations forums :
    Inscription : Juillet 2013
    Messages : 35
    Par défaut
    Bonjour, peut être que le .net framework 4.0 n'est pas installé sur le pc cible non ??
    avant de tester cela sur l'autre pc est ce que tu as bien déployer ton application ?? tu l'as bien installé ?? ou tu as simplement copier l'executable ???

  3. #3
    Inactif  

    Homme Profil pro
    Développeur .NET
    Inscrit en
    Janvier 2012
    Messages
    4 903
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 68
    Localisation : Canada

    Informations professionnelles :
    Activité : Développeur .NET
    Secteur : Finance

    Informations forums :
    Inscription : Janvier 2012
    Messages : 4 903
    Billets dans le blog
    36
    Par défaut
    Bonjour,

    Le numéro de l'erreur laisse voir une erreur com/automation, mais je ne sais pas laquelle.

    Si ma boule de cristal est efficace, tu sembles utiliser Excel pour afficher des graphiques en VB.net, et cela génère en moi la question pourquoi ?

    Microsoft offre gratuitement son ChartControl pour .net.

    Chez SourceForge, tu peux trouver la bibliothèque gratuite Zedgraph.


    Et il y a sûrement d'autres composants .net gratuits et payants, disponibles un peu partout.

    Tout ça pour dire que tu peux sûrement te passer d'Excel pour afficher des graphiques en .net

  4. #4
    Membre averti
    Profil pro
    Inscrit en
    Avril 2011
    Messages
    31
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2011
    Messages : 31
    Par défaut
    Les graphiques sont afficher sur mon application vb.net mais je les exporte sous Excel pour pouvoir les utiliser par d'autre personnes sur n'importe quel autre PC. Et je ne peux pas transporter autrement mes graphiques que sous Excel donc.

    .net framework est installé, je lance parfaitement toute mon application et réalise d'autre action parfaitement (communication avec des automates entre autre chose)

  5. #5
    Membre averti
    Profil pro
    Inscrit en
    Avril 2011
    Messages
    31
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2011
    Messages : 31
    Par défaut
    Citation Envoyé par anasschiguer Voir le message
    Bonjour, peut être que le .net framework 4.0 n'est pas installé sur le pc cible non ??
    avant de tester cela sur l'autre pc est ce que tu as bien déployer ton application ?? tu l'as bien installé ?? ou tu as simplement copier l'executable ???
    J'ai simplement copier le dossier release et lancé l'exécutable, et mon application fonctionne, j'arrive à me connecter à mon automate avec la librairie correspondante. Tout fonctionne de cette mainère sauf cette exception sur l'instruction
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    myChart = .ChartObjects.Add(0, 0, 600, 450)
    que je ne comprend pas

    (j'avais essayé de faire publish, il m'a créé une installe que j'ai exécuté, il me l'a installé et quand j'essayais de le lancer un processus s'ouvrait mais rien ne se passait.)

    Mon code complet est le suivant :

    Excel commence à ralentir à la ligne 75 et
    L'exception apparait à la ligne 79



    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
             Dim rowsTotal, colsTotal As Short
            Dim I, j, iC As Short
            System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor
            Dim xlApp As New Microsoft.Office.Interop.Excel.Application
            Dim excelBook As Microsoft.Office.Interop.Excel.Workbook = xlApp.Workbooks.Add
            Dim excelWorksheet As Microsoft.Office.Interop.Excel.Worksheet = CType(excelBook.Worksheets(1), Microsoft.Office.Interop.Excel.Worksheet)
            Dim excelWorksheet2 As Microsoft.Office.Interop.Excel.Worksheet = CType(excelBook.Worksheets(2), Microsoft.Office.Interop.Excel.Worksheet)
     
            ' Define a title for the message box.
            Dim title = "Exportation"
            Dim response = MsgBox("Exportation des données, veuillez patienter.", , title)
     
            Try
                xlApp.Visible = True
                rowsTotal = Form2.DataGridView1.RowCount - 1
                colsTotal = Form2.DataGridView1.Columns.Count - 1
     
     
                With excelWorksheet
                    .Name = "Données"
                    .Cells.Select()
                    .Cells.Delete()
                    For iC = 0 To colsTotal
                        .Cells(1, iC + 1).Value = Form2.DataGridView1.Columns(iC).HeaderText
                        .Cells(1, iC + 1).Interior.ColorIndex = 3
                    Next
     
                    With excelWorksheet.Cells.Range(excelWorksheet.Cells(1, 1), excelWorksheet.Cells(1, colsTotal + 1))
                        .Cells.Borders(Microsoft.Office.Interop.Excel.XlBordersIndex.xlEdgeBottom).LineStyle = Microsoft.Office.Interop.Excel.XlLineStyle.xlContinuous
                        .Cells.Borders(Microsoft.Office.Interop.Excel.XlBordersIndex.xlEdgeBottom).Weight = Microsoft.Office.Interop.Excel.XlBorderWeight.xlThick
                        .Cells.Borders(Microsoft.Office.Interop.Excel.XlBordersIndex.xlEdgeBottom).ColorIndex = 0
                        .Cells.Borders(Microsoft.Office.Interop.Excel.XlBordersIndex.xlEdgeRight).LineStyle = Microsoft.Office.Interop.Excel.XlLineStyle.xlContinuous
                        .Cells.Borders(Microsoft.Office.Interop.Excel.XlBordersIndex.xlEdgeRight).Weight = Microsoft.Office.Interop.Excel.XlBorderWeight.xlThick
                        .Cells.Borders(Microsoft.Office.Interop.Excel.XlBordersIndex.xlEdgeRight).ColorIndex = 0
                        .Cells.Borders(Microsoft.Office.Interop.Excel.XlBordersIndex.xlEdgeLeft).LineStyle = Microsoft.Office.Interop.Excel.XlLineStyle.xlContinuous
                        .Cells.Borders(Microsoft.Office.Interop.Excel.XlBordersIndex.xlEdgeLeft).Weight = Microsoft.Office.Interop.Excel.XlBorderWeight.xlThick
                        .Cells.Borders(Microsoft.Office.Interop.Excel.XlBordersIndex.xlEdgeLeft).ColorIndex = 0
                    End With
     
                    For I = 0 To rowsTotal - 1
                        For j = 0 To colsTotal
                            .Cells(I + 2, j + 1).value = Form2.DataGridView1.Rows(I).Cells(j).Value
                        Next j
                    Next I
     
                    With excelWorksheet.Cells.Range(excelWorksheet.Cells(2, 1), excelWorksheet.Cells(rowsTotal + 1, colsTotal + 1))
                        .Cells.Borders(Microsoft.Office.Interop.Excel.XlBordersIndex.xlEdgeBottom).LineStyle = Microsoft.Office.Interop.Excel.XlLineStyle.xlContinuous
                        .Cells.Borders(Microsoft.Office.Interop.Excel.XlBordersIndex.xlEdgeBottom).Weight = Microsoft.Office.Interop.Excel.XlBorderWeight.xlThin
                        .Cells.Borders(Microsoft.Office.Interop.Excel.XlBordersIndex.xlEdgeBottom).ColorIndex = 0
                        .Cells.Borders(Microsoft.Office.Interop.Excel.XlBordersIndex.xlEdgeRight).LineStyle = Microsoft.Office.Interop.Excel.XlLineStyle.xlContinuous
                        .Cells.Borders(Microsoft.Office.Interop.Excel.XlBordersIndex.xlEdgeRight).Weight = Microsoft.Office.Interop.Excel.XlBorderWeight.xlThin
                        .Cells.Borders(Microsoft.Office.Interop.Excel.XlBordersIndex.xlEdgeRight).ColorIndex = 0
                        .Cells.Borders(Microsoft.Office.Interop.Excel.XlBordersIndex.xlEdgeLeft).LineStyle = Microsoft.Office.Interop.Excel.XlLineStyle.xlContinuous
                        .Cells.Borders(Microsoft.Office.Interop.Excel.XlBordersIndex.xlEdgeLeft).Weight = Microsoft.Office.Interop.Excel.XlBorderWeight.xlThin
                        .Cells.Borders(Microsoft.Office.Interop.Excel.XlBordersIndex.xlEdgeLeft).ColorIndex = 0
                        .Cells.Borders(Microsoft.Office.Interop.Excel.XlBordersIndex.xlInsideHorizontal).LineStyle = Microsoft.Office.Interop.Excel.XlLineStyle.xlContinuous
                        .Cells.Borders(Microsoft.Office.Interop.Excel.XlBordersIndex.xlInsideHorizontal).Weight = Microsoft.Office.Interop.Excel.XlBorderWeight.xlThin
                        .Cells.Borders(Microsoft.Office.Interop.Excel.XlBordersIndex.xlInsideHorizontal).ColorIndex = 0
                        .Cells.Borders(Microsoft.Office.Interop.Excel.XlBordersIndex.xlInsideVertical).LineStyle = Microsoft.Office.Interop.Excel.XlLineStyle.xlContinuous
                        .Cells.Borders(Microsoft.Office.Interop.Excel.XlBordersIndex.xlInsideVertical).Weight = Microsoft.Office.Interop.Excel.XlBorderWeight.xlThin
                        .Cells.Borders(Microsoft.Office.Interop.Excel.XlBordersIndex.xlInsideVertical).ColorIndex = 0
                    End With
     
                    .Rows("1:1").Font.FontStyle = "Bold"
                    .Rows("1:1").Font.Size = 10
                    .Cells.Columns.AutoFit()
                End With
     
                'create chart
                Dim chartPage As Microsoft.Office.Interop.Excel.Chart
                Dim myChart As Microsoft.Office.Interop.Excel.ChartObject
                Dim chartRange As Microsoft.Office.Interop.Excel.Range
     
    msgbox("jusque là ça marche nickel ensuite ça plante sur myChart = .ChartObjects.Add(0, 0, 600, 450)") 
                excelWorksheet2.Select()
     
                With excelWorksheet2
                    .Name = "Graphe"
                    myChart = .ChartObjects.Add(0, 0, 600, 450)
                End With
     
                Dim misValue As Object = System.Reflection.Missing.Value
                xlApp = New Microsoft.Office.Interop.Excel.Application
                excelBook = xlApp.Workbooks.Add(misValue)
     
                '   xlCharts = excelWorksheet2.ChartObjects
                '   myChart = excelWorksheet2.ChartObjects.Add(0, 0, 600, 450)
     
                chartPage = myChart.Chart
                chartRange = excelWorksheet.Range(excelWorksheet.Cells(1, 3), excelWorksheet.Cells(rowsTotal + 1, colsTotal + 1))
                chartPage.SetSourceData(Source:=chartRange, PlotBy:=Microsoft.Office.Interop.Excel.XlRowCol.xlColumns)
                chartPage.ChartType = Microsoft.Office.Interop.Excel.XlChartType.xlLine
     
                Dim NameFile As String
                If cyclename = "" Or cycleshort = "" Then
                    If Directory.Exists(Application.StartupPath.ToString() & "\" & "enregistrement manuel") = False Then
                        Directory.CreateDirectory(Application.StartupPath.ToString() & "\" & "enregistrement manuel")
                    End If
                    NameFile = Application.StartupPath.ToString() & "\" & "enregistrement manuel" & "\" & "_axe" & axe & "_manu" & "_" & Date.Now.Hour & "h" & Date.Now.Minute & ".xls"
                    If File.Exists(NameFile) Then
                        NameFile = Application.StartupPath.ToString() & "\" & "enregistrement manuel" & "\" & "_axe" & axe & "_manu" & "_" & Date.Now.Hour & "h" & Date.Now.Minute & "min" & Date.Now.Second & ".xls"
                    End If
                Else
                    If Directory.Exists(Application.StartupPath.ToString() & "\" & cyclename) = False Then
                        Directory.CreateDirectory(Application.StartupPath.ToString() & "\" & cyclename)
                    End If
                    NameFile = (Application.StartupPath.ToString() & "\" & cyclename & "\" & cycleshort & "_axe" & axe & "_auto" & "_" & Date.Now.Hour & "h" & Date.Now.Minute & ".xls")
                    If File.Exists(NameFile) Then
                        NameFile = Application.StartupPath.ToString() & "\" & cyclename & "\" & cycleshort & "_axe" & axe & "_auto" & "_" & Date.Now.Hour & "h" & Date.Now.Minute & "min" & Date.Now.Second & ".xls"
                    End If
                End If
     
                excelWorksheet2.Cells(1, 1).select()
                excelWorksheet2.SaveAs(NameFile)
                excelBook.Close(False)
                ' xlApp.Quit()
                releaseObject(xlApp)
                releaseObject(excelBook)
                releaseObject(excelWorksheet)
     
                Dim style = MsgBoxStyle.MsgBoxSetForeground
                MsgBox("Exportation terminée avec succès.", style)
     
            Catch ex As Exception
                MsgBox("Export Excel Error " & ex.Message)
            Finally
                'RELEASE ALLOACTED RESOURCES   
                System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default
                xlApp = Nothing
            End Try
            Return (True)
    Cordialement


    Visual Studio 2010 express



    PS : dans mes références visual studio Microsoft.office.interop.Excel sa version et la 11 elle ne fera donc pas fonctionner la version 2007 d'office ? Comment puis-je mettre la version 12 en référence sachant que j'ai office 2003 d'installer sur l'ordinateur de programmation.

  6. #6
    Membre averti
    Profil pro
    Inscrit en
    Avril 2011
    Messages
    31
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2011
    Messages : 31
    Par défaut
    Bonjour,


    J'ai résolu mon problème par moi même après une semaine de recherche, donc je viens donner ma solution.

    Après recherche l'instruction qui ne fonctionnait pas était bien dû a la mauvaise version du interop.Excel qui était en v11.0. J'ai donc était sur un ordinateur qui était sous office 2007 et j'ai extrait le fichier microsoft.office.interop.Excel.dll de l'assembly avec l'invite de commande cmd, un simple "dir vers l'assembly" et ensuite un "copy" m'a permis de récuperer le dll et ensuite le mettre sur le PC avec office 2003 pour l'intégrer comme référence à mon projet

    Cordialement

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Creation dynamique de chart sur une GridPanel
    Par sapin dans le forum Débuter
    Réponses: 16
    Dernier message: 28/05/2008, 11h58
  2. Probleme sur creation menu popup
    Par biloute2121 dans le forum MFC
    Réponses: 1
    Dernier message: 11/01/2006, 08h41
  3. Réponses: 2
    Dernier message: 17/11/2005, 13h57
  4. pb sur creation de tables
    Par RolandB dans le forum SQL Procédural
    Réponses: 6
    Dernier message: 14/11/2005, 08h54
  5. [Exception]Gestion des exceptions, capture sur la classe.
    Par @lantis dans le forum Général Java
    Réponses: 9
    Dernier message: 22/07/2005, 19h43

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo