0

Export file excel in a subtable.

In my record that have a subtable that I need to export to a file excel, how do i do that?

12 replies

null
    • Fred
    • 4 mths ago
    • Reported - view

    Here is what the docs say.

      • Nguyen_Nhat_Dong
      • 4 mths ago
      • Reported - view

       it is would be easy to export an excel sheet with table outside of the record, but what happen to the subtable inside the record?

      it there are any button to export excel file in the subtable?

      • Fred
      • 4 mths ago
      • Reported - view

      The subtable is just a table. If you are in admin mode you can see all of your tables. The subtable will be under the main table.

      • Nguyen_Nhat_Dong
      • 4 mths ago
      • Reported - view

       I think you misunderstood me.

      I want to export a excel file from this table here, But there is no button to export file file except those "Add existing record" and "Create record"

      • Fred
      • 4 mths ago
      • Reported - view

      That view element is your Shipping table. So you can go to your shipping table and do a filter to recreate the records then create a view that has the appropriate fields then export that.

      Take a look at this post for more information about exporting through a script.

      • Nguyen_Nhat_Dong
      • 4 mths ago
      • Reported - view

       I tried to create a button that Open table, but can I filter that table with the button too?

      • Fred
      • 4 mths ago
      • Reported - view

       I don’t think so. There is no way that I know to set the filter of a table view column. You might want to consider using a view element.

    • Fred
    • 4 mths ago
    • Reported - view

    Looks like in 3.12, there will be the ability to export to excel through code, createXLSX().

      • Rafael Sanchis
      • Rafael_Sanchis
      • 4 mths ago
      • Reported - view

       Yes I have seen that it looks good

    • Nguyen_Nhat_Dong
    • 4 mths ago
    • Reported - view

    So this is what I have tried to do in with CreateLSX() function:

    let columns := [{
                header: "Name",
                key: "name",
                width: 10
            }, {
                header: "Age",
                key: "age",
                width: 10
            }];
    let rows := [select SHIPPING;
            {
                name: this.SHIPPING.'NGUOI NHAN (RECEIVER)'.'NGUOI GUI'.TEN,
                age: this.SHIPPING.'SO LBS'
            }];
    let worksheets := {
            Sheet1: {
                columns: columns,
                rows: rows
            }
        };
    Image := createXLSX(this, worksheets, "example.xlsx")

    it return a file excel like this.

    A Positive thing is it select the right data, but it using like a concat function. 

     can you help me with this? Thanks you.

      • Fred
      • 4 mths ago
      • Reported - view

      Take a look at this post.

      • Nguyen_Nhat_Dong
      • 4 mths ago
      • Reported - view

       thanks, I got the code right.

Content aside

  • 4 mths agoLast active
  • 12Replies
  • 136Views
  • 3 Following