Visual Builder

Get Involved. Join the Conversation.


    Subramanian K V
    Downloading multiple tables from UI to CSV
    Topic posted November 15, 2019 by Subramanian K VGreen Ribbon: 100+ Points, tagged JET, Layout, UI, Web 
    24 Views, 5 Comments
    Downloading multiple tables from UI to CSV
    How to download multiple tables in a single cvs

    Hi All,

    I have requirement to download multiple table data into CVS. The table structure is as below,

    One Parent table.

    5 child tables available in under "TABS WITH CONTENT" and another child table next to the parent one.

    Additionally one more child table but not available in the UI.

    Totally 7 tables(6 visible in the UI & 1 not available in UI but child records present in the respective BO)  


    The child tables will be refreshed when I toggle between Parent table records. So in a button action, I need to get the current parent and its child related data as separate tables, 7 child tables and one table with one row which should have the selected parent record information. All these in single csv file.

    Experts please provide your inputs.








    • Shay Shmeltzer

      We have a reusable component that export data from one table in the UI to a file - get it from the component exchange and see how it works.

      That being said, I think a better approach would be to generate the file with the data on the backend rather than on the UI.

      So the UI would call a function on your backend that accept the id for the master record and then construct the excel spreadsheet with the rest of the data.

      There is no built-in functionality for this in VB - so you'll want to use some solution for creating Excel programmatically - there are multiple solution for this depending on the language you are using - google can help find one for you.



    • Subramanian K V

      Thanks Shay,

      Can I use Groovy to generate the file from backend and same I can expose as a REST API.

      If so, how will I get the output file from the REST API, which has to be downloaded as an Excel file.

      Please suggest.





    • Subramanian K V

      So may be with JavaScript or Jquery like technologies, is that what you are sugeesting

      • Shay Shmeltzer

        Are you aiming to write the file on the client machine? I don't think JS on the client can access local files and write to them.

        This will need to be done on the server side and the file will be sent back to the client.