Hitachi Vantara Pentaho Community Forums
Results 1 to 7 of 7

Thread: Excel column format

  1. #1

    Default Excel column format

    I have table component and set appropriate column types and format for all columns.
    For example, for total count, we set column type as numeric and format as %d.
    When I am exporting to excel, the respective cell show data in the decimal but it should display only integer.

    Is anyone faced same issue? any workaround?

    Regards,
    Vinayak

  2. #2
    Join Date
    Mar 2011
    Posts
    139

    Default

    Vinayak

    If I understand correctly, you want an output that is an integer and not decimal. For my Excel reports, I use the format "#" as this prevents decimal places in the output.

    I trust that this helps.

    Thanks
    Ray

  3. #3

    Default

    Hi Ray,
    One thing I need to clear - I am using CDE to generate dashboard and CDA query to generate excel such as

    xxxxx.queryState.exportData('xls');

    I am not sure how I can use '#' in the column format in the table component.

    Can you please help me?

    Thanks
    Vinayak

  4. #4
    Join Date
    Mar 2011
    Posts
    139

    Default

    My comments were how to use the "#" symbol when using an output step where you have the format column available. I am not familiar with using the CDE functionality. It read the statement as the query will export to an Excel document. I have to assume that the export function will use the format of the data that you are extracting.

    I wish I could provide a more definitive answer.

    Ray

  5. #5
    Join Date
    Dec 2010
    Posts
    304

    Default

    Hi,
    I usually export table components to Excel using this javascript 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 the Excel file.

  6. #6

    Default

    Thanks Ray, I will check on changing data type in the query and column format while designing table component.

  7. #7

    Default

    Thanks Luca, I will try to use your javascript code to export the table components.

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.