Export CDT to Excel - Column type format Issue

We are using "Parse Excel to CDT" smart service from "Excel Tools" plugin to parse the uploaded rows. doing some validations with uploaded rows, if we find any rows with issues exporting those rows in to Excel using "Export CDT to Excel" Our target is to download the exported excel and correcting the rows and upload again.
After downloading the excel all columns in excel showing "General" format Even though we have set a column to Date/Number format (column data type is date/integer as well, database is Oracle) in the excel template, the generated excel does not retain the date format. Is there a way to force excel recognize the cell values as Date/Number for a column?

  Discussion posts and replies are publicly visible

  • Hi Vinod,

    AFAIK "Export CDT to Excel" plugin read the data in CDT and put it in Excel with the specified/all columns . It won't modify any column data format.

    Please check the input date formats and compare it to excel data.

     

    Thanks

    Siva Chimata.

  • Hi vinod alla (vinoda) ,

    Export CDT to Excel requires Excel_base_template, so can you try by formatting the excel cells to required type in the template.

  • 0
    A Score Level 1
    in reply to Venu
    Hey Siva/Venu,

    Thanks for your reply, My excel and CDT both are same format excel I selected date format is ‘“mm/dd/yyyy” but when we export the date format is showing “dd-mmm-yyyyy” in excel, if you upload with out changing “dd-mmm- yyyy” format to “mm-dd-yyyy” “Parse excel to CDT” is not reading the data. Data is showing null.

    When I double click on each date field in the exported excel date format is changing from “dd-mmm-yyyy” to “mm-dd-yyyy” but users don’t accept this.

    And I have Boolean field in CDT what is the format I have to use in EXCEL? I used “General” format but this not working as I expected

    Thanks
    Vinod
  •  Hi vinod alla (vinoda) ,

    Plug-in might be doing the date format conversion, As a work around you can do as below
    1. Create a duplicate cdt exactly what you are currently exporting but keep all the field types as "TEXT".
    2. Format Excel template cells as Text.
    3. Move the information for current cdt type variable to Duplicate cdt type (make sure convert your date values to required format).
    4. Use the Duplicate cdt variable to export.

    Converting Date format:
    a!forEach(
     items: {pv!cdt.date1},
     expression: datetext(fv!item,"MM/dd/yyyy")) 

    Boolean variable exported to excel as Yes or No if data type is boolean, true or false if boolean type converted to text data type.
    No mater for boolean, Appian will do auto casting either (true or false) or (Yes or No) to boolean type.

    Regards,

    Venu.

  • 0
    A Score Level 1
    in reply to Venu
    Thanks Vasu,

    I tried above steps still downloaded Excel behaving same ..when you double click on Date field it changing to Date automatically. if you don't double click the Date field is showing Text only.

    "Parse Excel to CDT" will take what ever the CDT type otherwise throwing an errors.

    When we used fn!readexcelsheet() in place of "Parse Excel to CDT" .. This worked as i expected.

    Thanks
    Vinod
  • 0
    Certified Lead Developer
    in reply to Siva
    For clarification - Export CDT to Excel *does in fact* overwrite any and all column formatting with a basic/general format. There is no way around this that I know of.
  • Mike - Yes When you use "Date" as CDT element type and in Export CDT ..The Date is Showing - "dd-mmm-yyyy " in downloaded excel. When you double click on this it's changing to actual date format "dd/mm/yyyy" ..i didn't do any format changes in the process.
  • 0
    Certified Lead Developer
    in reply to vinod alla
    To clarify further, I'm not talking about the formatting of any particular data being passed in. As far as i know, the data will end up appearing in the excel file in whatever format it was sent by Appian. I'm referring to the in-excel formatting on cells, columns, etc, to include text formatting, cell borders, and data type - all of which are completely removed and reverted to the basic "blank" excel format after being written to by the CDT to Excel smart service (and other similar ones).