locked
Import from Excel - 'Could not find an entity container representing the entity type: <entity type> RRS feed

  • Question

  • Situation (in VS2012 LightSwitch):

    Table with 3 columns: C1 (string), C2(string) and C3(type <abc>). C3 represents the relationship with a second table (<abc>).

    XL sheet (2010) containing 3 columns (all text).

    When I import C1 and C2 (C3 put on 'ignore') it works fine.
    When I attempt to import all three columns the screen halts with erro message:  'Could not find an entity container representing the entity type: <abc>'.   <abc> is nevertheless present in the datapart of the screen...

    (I used this simple technique quite often with success in LS 2011 v1 to import data from an old application, but when I rerun it now the screen halts with the same message)

    Questions:

    - has something changed for this functionality between LS2011 and VS2012?
    - can someone point me in the right direction about the error message?

    Thanks in advance.

    Alan


    VFP9Belgium

    Monday, September 24, 2012 1:43 PM

Answers

  • Hi Alan

    Are you using your own custom code or Office Integration Pack to export to excel?

    If it is working with LS2011 then it should work with 2012. Yes there are some changes betwee these two version but i don't think it will affect to client side. Right now i can't able to find out the exact answer for your second question better i suggest you to use Office Integration Pack to export to excel and pdf format.

    Regards


    Rashmi Ranjan Panigrahi
    www.lightswitchspecial.com

    If you found this post helpful, please “Vote as Helpful”. If it answered your question, please “Mark as Answer”.
    This will help other users to find their answer quickly.

    • Marked as answer by VFP9Belgium Tuesday, September 25, 2012 5:40 AM
    Monday, September 24, 2012 2:37 PM

All replies

  • Hi Alan

    Are you using your own custom code or Office Integration Pack to export to excel?

    If it is working with LS2011 then it should work with 2012. Yes there are some changes betwee these two version but i don't think it will affect to client side. Right now i can't able to find out the exact answer for your second question better i suggest you to use Office Integration Pack to export to excel and pdf format.

    Regards


    Rashmi Ranjan Panigrahi
    www.lightswitchspecial.com

    If you found this post helpful, please “Vote as Helpful”. If it answered your question, please “Mark as Answer”.
    This will help other users to find their answer quickly.

    • Marked as answer by VFP9Belgium Tuesday, September 25, 2012 5:40 AM
    Monday, September 24, 2012 2:37 PM
  • Thanks for your reply Rashmi.

    I am using the Excel importer of the Lightswitch Utilities (v 1.0) with the standard code

    ' LightSwitchUtilities.Client.ImportFromExcel(Me.<entity>)'

    The issue arises with import from Excel 2010 to LS; it is not about exporting.

    Kind regards

    Alan


    VFP9Belgium

    Monday, September 24, 2012 3:10 PM
  • Hi Alan

    Kindly verify your code again. I think your code should be:

    ExcelImporter.Importer.ImportFromExcel(Me.YourCollection)

    Regards

    Rashmi Ranjan Panigrahi
    www.lightswitchspecial.com

    If you found this post helpful, please “Vote as Helpful”. If it answered your question, please “Mark as Answer”.
    This will help other users to find their answer quickly.

    Monday, September 24, 2012 4:24 PM
  • Helo Rashmi,

    - Intellisense returns then an error on ExcelImporter ('...is not declared.'), BUT

    - further to your first reply I tried the Office Integration Integration pack and that works!

    Therefore my 2nd question is answered and my issue is solved.

    Remains the first question, but that is of a more academic nature now.  I'll close the case.

    Thanks a lot.

    Kind regards

    Alan


    VFP9Belgium

    Tuesday, September 25, 2012 5:40 AM