4 Replies Latest reply: Sep 13, 2012 7:38 AM by Elena.mtc RSS

    Use of excel2collection not working

    Elena.mtc
      Hey everyone,

      I'm trying to upload an XLS format file with APEX; I'm using Apex listener and following the steps that I saw in blogs like Spendolini's (http://spendolini.blogspot.com.es/2010/02/uploading-xls-files-with-apex-listener.html) and in this forum (https://kr.forums.oracle.com/forums/thread.jspa?threadID=2342792). However, it seems that I'm not getting any information in the collection, since I get a "No data found" message after uploading the excel.

      I try to check the collection info in 3 ways: from the debug mode, from the SQL Commands (select * from apex_collections) and using a report in the same page where the File Browser is located. In these 3 ways, the result is the same: No data found.

      I checked that the request for the "Upload" button is "xls2collection", and the lines added in the apex_config.xml are the following:
      <entry key="apex.excel2collection">true</entry>
      <entry key="apex.excel2collection.onecollection">false</entry>
      Does it matter where these lines are added?

      I'm using APEX 4.1.1. I would appreciate any help on this.

      Thanks,
      Elena.
        • 1. Re: Use of excel2collection not working
          Udo
          Hi Elena,
          I'm trying to upload an XLS format file with APEX
          Which Excel version is your file based on? Note that APEX Listener currently can only handle versions prior up to 2003.
          I checked that the request for the "Upload" button is "xls2collection"
          Do you have any other actions on that page? And what is the target of your file browse item? (Should be WWV_FLOW_FILES )
          Does it matter where these lines are added?
          They should be within the +<properties>+ tag that surrounds the other entries. Despite that, the order shouldn't matter, though I've only had them after the other entries.
          Did you restart APEX Listener after you've added these entries?

          Could you post the APEX Listener log output for the upload attempt?

          -Udo
          • 2. Re: Use of excel2collection not working
            Elena.mtc
            Hi Udo,

            I'm using version 2003 of xls.

            Yes, I specified that the target is WWV_FLOW_FILES. However, I queried the view and the data was not inserted into it. I'm going to run some tests meanwhile (query the table wwv_flow_file_objects$).

            Do I have to configure something else with the file browse besides to set the target to WWV_FLOW_FILES?

            Thanks a lot!

            --Elena.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
            • 3. Re: Use of excel2collection not working
              Udo
              Hi Elena,
              I'm using version 2003 of xls.
              Okay, so it should work, after all...
              Yes, I specified that the target is WWV_FLOW_FILES. However, I queried the view and the data was not inserted into it.
              The contents of the view depends on your session state. It will limit the results to objects handled in your current workspace. So if you query this view from the outside (e. g. using SQL Developer), you'll have to setup the environemt accordingly, or...
              I'm going to run some tests meanwhile (query the table wwv_flow_file_objects$).
              query the actual source table directly. But I guess you didn't find anything in there, because your query in SQL Commands (within your workspace) didn't return anything, so it's not in there.
              Do I have to configure something else with the file browse besides to set the target to WWV_FLOW_FILES?
              No. The next important thing is the request parameter when you submit the upload. But you've since you've posted that this is set to xls2collection this should be fine as well.

              You say your report is on the same page. How did you configure the branch, especially the "Actions" section?

              And since you didn't provide it yet, it would really be helpful to have the APEX Listener's log for the time you've tried to get that working...

              -Udo
              • 4. Re: Use of excel2collection not working
                Elena.mtc
                Hi Udo,

                we got it right this time. I think the problem was in the apex_config.xml and that the department in charge of the machine didn't restart the apex listener.

                Thanks a lot!

                --Elena.