Hello Alteryx Team,
I have a workflow that converts excel file to .dat extension format using csv. The workflow already generate an output in .dat format however, it does not have yet cleanse the output. I need some help in the cleanse tools or any tool that will remove all special characters except to dates with /slash (date format is 01/01/2000) and except for period inside the amount (ex. 500000.25).
I only use cleanse tool when column headers are there. However, in this case, the excel file has no header that is permanent and the first row contains data that is dynamic, changes every month.
The question is, are there any tools other than cleanse tool that eliminates all special characters captured in excel file whatever data or number of columns/fields the excel file has as long as the slash(/) in all dates are retained? Also, is it possible to use one workflow to various excel files with different number of columns or different data set? We have different files that need to be converted from xlsx to .dat extension file and all these files may have different columns and dates are located in one or 2 of these columns.
Attached is the dummy input (excel) and workflow for your reference. Thank you in advance.
Solved! Go to Solution.
Hi @binuacs , need your assistance again. I am trying to add "apostrophe (') in the regex formula as one of the characters to be removed but I am getting error when inserted that charcter to the regex formula.
current regex:
regex error when I try to include ('):
Also can we add in the regex or replace Ñ as N? Thank you.
@PassION_es use the below regex formula to remove the character '
IIF(REGEX_Match([Value],'\d+\/\d+\/\d{4}'),[Value],IIF(REGEX_Match([Value],'\d+\.\d+'),toString(toNumber([Value]),2,0),IIF(REGEX_Match([Value],'\d+\/\d{4}'),[Value],ReplaceChar([Value],"/'.,*!;",''))))
Thank you @binuacs , it validated successfully now.