4 Replies Latest reply: Mar 31, 2011 3:01 PM by Johan Adolfsson RSS

    Loading Excel files

    Johan Adolfsson


      I am loading multiple excel files from a specific folder using a for each loop. This works fine.
      My problem is that the structure of some excel files isn't what I am expecting it to be (there are two different versions / structures). The number of columns change from 7 to 10 and the fieldnames (column lables) are different. I know I could manually edit the files but i wish to avoid that.
      How do I deal with this situation? Can qlikview help me?

      I read about SQLColumns and with that I should be able to count the number of columns in an excel file before it is loaded, but I can't get it to work. My odbc connection keeps failing, Message...SQL##f - SqlState: 42000, ErrorCode: 4294965487 ..

      ODBC CONNECT TO [Excel Files;DBQ='C:\Lists\9786438.xls];


      Is there other techniques or ways to get around the problem with loading multiple excelfiles into Qlikview when u have files with different number of columns and/or different column names ?

      I would really appreciate some help on this.
      I attached an example qvw file of how I load excel files.