Hitachi Vantara Pentaho Community Forums
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Excel Export CDE

  1. #1
    Join Date
    Dec 2012
    Posts
    121

    Default Excel Export CDE

    Hi guys,
    i have some questions on excel export.
    1- is there a way to set a file excel name?
    2- is there a way to manage (manipulate) data before the export(change column names, eliminate some columns, etc.)?

    Thanks in advance.
    Yamas

  2. #2
    Join Date
    Dec 2010
    Posts
    304

    Default

    Hi marcolino,
    I export table components to Excel using this code:

    Code:
    window.open("data:application/vnd.ms-excel," + encodeURIComponent( $( "# " + myTableHtmlObject ).html() ));
    In this way I can export the changes I made to the data and to the table style.

    Unfortunately I can't set a name to Excel file.

  3. #3
    Join Date
    Dec 2012
    Posts
    9

    Default

    Really looking forward to the answer for the first point...

  4. #4
    Join Date
    Dec 2012
    Posts
    121

    Default

    Hi lukolap,
    first of all thanks for your response!
    However i have a CCC2 bar chart component, not only a table component.
    Can you suggest me something?

    Yamas,
    Marco

  5. #5
    Join Date
    Dec 2010
    Posts
    304

    Default

    You could manipulate the json object returned by CDA

  6. #6
    Join Date
    Dec 2012
    Posts
    121

    Default

    Ok, but i have to re-execute the query or can i take data from barchart?

    Is there a way?

  7. #7
    Join Date
    Dec 2010
    Posts
    304

    Default

    In postFetch of your chart component you should be able to read and change the json object containing the query result:
    Code:
    function(json) {
    console.log(json); //if you want to see json content
    //... your code to manipulate it ...
    }

  8. #8
    Join Date
    Dec 2012
    Posts
    121

    Default

    Yes, i know this.
    I ask if is it possible to get barchart data from external function.
    I have a button component and on click i want to extract data from barchart and i don't want to re-execute the query.
    Is it possible?

  9. #9
    Join Date
    Dec 2010
    Posts
    304

    Default

    Ok,
    add a custom parameter to the dashboard where you clone the json object every postFetch event

  10. #10
    Join Date
    Dec 2012
    Posts
    121

    Default

    Brilliant man!
    I will follow this way!

    Thanks,
    Yamas

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.