none
'Microsoft.Office.Tools.Excel.ExcelLocale1033Proxy.Wrap(System.Type, object)' is obsolete RRS feed

  • Question

  • I am trying to learn some VSTO.  I just downloaded and tried to run a project that presumably uses Excel to query a SQL Server DB (I guess).  I can't run the code because I'm getting this error:

    Warning    1    'Microsoft.Office.Tools.Excel.ExcelLocale1033Proxy.Wrap(System.Type, object)' is obsolete: 'ExcelLocale1033ProxyMethodObsolete'

     

    The original code was probably done in VS ver 3.5; I'm using VS ver. 4.0

     

    How can I make this work?

    Thursday, November 10, 2011 11:48 PM

Answers

  • Hi Rex

    << I just downloaded and tried to run a project that presumably uses Excel to query a SQL Server DB (I guess). >>

    Do you have SQL Server installed, with the database the solution is set up to use? (I see this connection string in the ThisAddin.VB class: Dim sConn As String = "Server=blondie;Database=Northwind;Integrated Security=SSPI;")

    If you don't, that would explain why the C# solution didn't run, and the VB solution wouldn't run, either.

    Searching on the text "ExcelLocale1033Proxy.Wrap" in the warning message you quote "Warning    1    'Microsoft.Office.Tools.Excel.ExcelLocale1033Proxy.Wrap(System.Type, object)' is obsolete: 'ExcelLocale1033ProxyMethodObsolete'" turns up a number of hits with useful information:
    http://social.msdn.microsoft.com/Search/en-US?query=ExcelLocale1033Proxy.Wrap

    The sum total is, that these classes are, as the message says, obsolete (they were designed for Office 2003 solutions). A Warning (yellow triangle with an exclamation point), as opposed to an error, usually won't keep your code from running. In a later message you show a different message, which is uninformative and probably is part of the solution code. What do you see if you click "Details" in that message?

    I rather suspect that this is actually the error handling (Try..Catch) in the method FillUsingDataSet and that it comes from your not having the SQL Server database in the connection string (above).


    Cindy Meister, VSTO/Word MVP
    Monday, November 28, 2011 7:46 AM
    Moderator

All replies

  • Hi ryguy72,

    Would you please share your project here? I think it will make more sense if we can anaylse the code.

    Have a good day,

    Ice

    Friday, November 11, 2011 2:25 AM
  • The sample code is from here:

    http://msdn.microsoft.com/en-us/office/bb872409

     

    I downloaded VB and got the error.  I just tried it again.  This is what I got:

     

    I also downloaded C# and got NO ERROR.  However, when I run the C# sample, nothing happens at all...  Excel opens and that's it.  Nothing happens...

    Friday, November 11, 2011 5:32 AM
  • Hi ryguy72,

     

    Thanks for posting in the MSDN Forum.

     

    I tried the sample code, and I can’t reproduce your error on my side. And I wounding whether there has error in the BindDataWithListObject method. Please comment the content of this method to see whether exception will be occurred.

     

    Have a good day,

     

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    Monday, November 14, 2011 8:24 AM
    Moderator
  • It is still not working.  I keep getting the same error.  I am using VS 2010.

    Any ideas? 

    I may just give up on this, at least for now.  I'm new to VSTO.  I was only trying to learn from this exercise.

    Sunday, November 27, 2011 8:51 PM
  • Hi Rex

    << I just downloaded and tried to run a project that presumably uses Excel to query a SQL Server DB (I guess). >>

    Do you have SQL Server installed, with the database the solution is set up to use? (I see this connection string in the ThisAddin.VB class: Dim sConn As String = "Server=blondie;Database=Northwind;Integrated Security=SSPI;")

    If you don't, that would explain why the C# solution didn't run, and the VB solution wouldn't run, either.

    Searching on the text "ExcelLocale1033Proxy.Wrap" in the warning message you quote "Warning    1    'Microsoft.Office.Tools.Excel.ExcelLocale1033Proxy.Wrap(System.Type, object)' is obsolete: 'ExcelLocale1033ProxyMethodObsolete'" turns up a number of hits with useful information:
    http://social.msdn.microsoft.com/Search/en-US?query=ExcelLocale1033Proxy.Wrap

    The sum total is, that these classes are, as the message says, obsolete (they were designed for Office 2003 solutions). A Warning (yellow triangle with an exclamation point), as opposed to an error, usually won't keep your code from running. In a later message you show a different message, which is uninformative and probably is part of the solution code. What do you see if you click "Details" in that message?

    I rather suspect that this is actually the error handling (Try..Catch) in the method FillUsingDataSet and that it comes from your not having the SQL Server database in the connection string (above).


    Cindy Meister, VSTO/Word MVP
    Monday, November 28, 2011 7:46 AM
    Moderator
  • Hi All, I have solved this problem in VB 2010. Just Remove this line, because it is not necessary to add this line of code. The compiler adds this code in the background. It is just localization issue.
    • Proposed as answer by MASafdari Tuesday, December 13, 2011 11:48 AM
    Tuesday, December 13, 2011 11:47 AM