Forum Discussion

techgirlbb's avatar
techgirlbb
Contributor
7 years ago

"External table is not in the expected format " error with .xlsx files

we have Input data in .xlsx file and using the DB table variables we are passing the data to application from Excel using Keyword tests(not scripted). It works fine earlier. some how I am getting the error very frequently and  Run tests is stopping by throwing Exception error as "External table is not in the expected format"

I have gone through the forum  and checked related to message . Performed  all suggested methods like Opening before and running the tests and checking excel work book.. didn't help.

 

Any other suggestions?

 

3 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    It would be helpful to see a bit more of what you are actually doing in your keyword test and your DB Table variable declaration.  Screenshots would be helpful.

     

    I set up a quick test on my end, defining a DB table to point to an .xlsx file containing data in a particular sheet.  I then ran that in a data driven loop to simply log the values in the one of the columns.  This worked fine without error.  So, more information will be helpful as to your specific implementation.

    • techgirlbb's avatar
      techgirlbb
      Contributor

      Robert appreciate your time to try to on the issue we are facing.Please find the more info from the attachment.

      Our one role scripts run through min  15 to max 25 pages. All the input variable values are coming from excel

       

       

       

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Question:

         

        Did something change in the structure of the Excel file?  New columns added? First row not column name any more?  Generally speaking, what you have displayed is simply that you have an excel file, assigned to a variable, and that there's an error in the test log.  There's not a lot of specifics to go on.  As mentioned in my earlier reply, I set up a DB Table variable to point to an Excel file and then referenced that file in a keyword test data driven loop.  My data ran just fine so it's not a problem with the basic technology.  

         

        You said this used to work... and now it doesn't...  As I just got done telling a co-worker here the other day, software does not stop working randomly for no reason.  Something changed.... the question is what.

         

        Some things that would be helpful:

         

        1) How are you utilizing the variable in your code? Can we see the code itself or the keyword test as to how you're using the data?

        2) What has changed recently, either in your implementation or in the spreadsheet/workbook?

         

        Without this, all I can tell you is that reading Excel sheets via a temporary variable into a TestComplete test works just fine.  We need more specifics.