FeatureSet to XLSX - date field type problem
I created a workflow to export a FeatureSet to an Excel spreadsheet. It does what it's supposed to do; however, all of the date fields export as "General" type giving me a numeric value instead of the date.
Is there a way to fix this?
I have tried creating a DataTable first then creating the XLSX, but the same thing happens.
Thank you,
Mike
0
-
Hi Michael,
Yes, by default all columns are added to the Excel spreadsheet as a string whose field type is just "General". There was a case filed with our developers about fixing the date column specifically in the Excel spreadsheet so that at least the date showed up properly. However, since there were not enough stakeholders to support this case, it was resolved as "Won't fix". So at this point, I would recommend adding this to the Ideas Board so more people can vote on this issue. If it receives enough votes, then the developers will implement it in a future release.
For now, the only thing that you can do is manually change the column type to date yourself by highlighting the entire column and then changing the column type from "General" to a date type and all your dates should show up properly.
I hope this helps,
Carmen0 -
Michael,
To reformat the dates before exporting to Excel, I usually create a table and then loop through the rows, reformatting each date field using an assign activity:
myDataTable.Rows(rowIndex).Item("MyDateField") = Format(myDataTable.Rows(rowIndex).Item("MyDateField"),"Short Date")
A bit of work if there are a lot of date fields, but makes our users happy. :)
Kathy1 -
Kathy,
Thank you so much. Works perfectly.
Mike0 -
Kathy,
Is the Format in your assign a variable that assigns the date format type?
Also, did you put the assign in a For Each Loop?
Do you mind sharing the part of your workflow that you got this working?
Thanks!
Cody0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
4 Kommentare