Visual Builder

Get Involved. Join the Conversation.

Topic

    Subba Bhamidipati
    Export to CSV/Excel functionality on VBCS (oj-table)Answered
    Topic posted March 18, 2019 by Subba BhamidipatiBronze Medal: 1,250+ Points 
    464 Views, 14 Comments
    Title:
    Export to CSV/Excel functionality on VBCS (oj-table)
    Summary:
    Is there a declarative way to enable "Export to Excel" on oj-table
    Content:

    Hi ,

    We have a requirement to export the rows displayed in table. Is there an easy way to achieve this? Just like the export listener on af:table in ADF. Or do we have to write JS code for this?

    Please suggest.

    Thanks

    Best Comment

    Shay Shmeltzer

    We are working on a component that will do this - hopefully should be out by next week.

    Comment

     

    • Shay Shmeltzer

      We are working on a component that will do this - hopefully should be out by next week.

      • Yifeng Wang

        Hi Shay,

        Is the "Export Data" in the "Components" tab the one you are refering to?

        I've just tried, it is great. However there is one issue. When exporting to utf-8 format, the csv has no BOM and non-ascii characters will not be displayed properly in Excel since Excel relies on the BOM to recognize the character encoding. Adding '\ufeff' at the beginning of the generated csv file solved the problem.

        Frankly speaking it's an Excel specific issue as it does not provide an easy way for you change the default character encoding for opening csv files. 

        However Excel will be the main editor that users are using to open csv files and utf-8 is widely used. Is it possible for the dev team to add some support to the "Export Data" component to support generating utf-8 csv files with BOM?

        Thanks very much!
        Ivan

        • Duncan Mills

          That's a reasonable request - I'll log an enhancement for the component and have a look at it we could easily  introduce a property to export in the special Excel UTF8 CSV format. 

          Out of interest, if, rather than just opening the CSV directly, if you instead create an Excel worksheet and the use the import file feature and then at that point choose File Origin as UTF-8 does it import OK? 

          • Yifeng Wang

            Thanks Duncan!

            And yes, the import feature with file origin as utf-8 chosen in Excel will work. However it's indirect and too troublesome if you have to this again and again. Won't be a good experience.

            I thought there would be a setting to specify the default encoding when opening files in Excel, however there is not. Only in windows you can achieve the same via a registry change.

            Regards,
            Ivan

        • Jaeyshree Kumaran

          Am getting this error when i created a new instance. How to overcome this

    • Subba Bhamidipati

      Thank you for the update.

      • Alex Davis

        Meanwhile, you may want to check out the Visual Builder Add-in for Excel to see if it meets your needs.

        https://www.oracle.com/technetwork/topics/cloud/downloads/visual-builder-addin-5250138.html

    • Subba Bhamidipati

      I just tried  <oj-ext-export-data> in VB application and found that it is failed export rows to CSV which has special characters (for ex., '#')in any column data. 

      Can some see if this can be fixed?

    • Duncan Mills

      I'll take a look

    • Subba Bhamidipati

      Duncan,

      Any update on this? Also we have a "String" (alpha-numeric type) column in our data set which has value "001".

      When I try to export it using "Export Data" component in VBCS, the column in excel shows as "1" (Looks like it is treating as numeric 1).

      Now, I tried setting type as "string" against that column /field but still it didn't work. Can you please check and help?

      Thanks,

      Subba

    • Duncan Mills

      Ok the encoding issue is now fixed and will become available in 1.1.0 of the component - I've chosen to add an extra property to the component to control the addition of the extra encoding information that excel needs - by default this will be switched on but you will have the ability to fall back to a vanilla CSV without the extra marker byte if you really need to

      I expect to release 1.1.0 some time next week

      • HARSHA VARDHAN PULAKUNTA JANARDHAN

        I have 4 parameters and when i select then and click on export there is no data for the first time. when i click for second time there is data returned. its rest call made in the action. what should i do to trigger export data file after the data is loaded to adp so that when i click for the first time data is returned. Can you please answer this

    • HARSHA VARDHAN PULAKUNTA JANARDHAN

      I have 4 parameters and when i select then and click on export there is no data for the first time. when i click for second time there is data returned. its rest call made in the action. what should i do to trigger export data file after the data is loaded to adp so that when i click for the first time data is returned