Although it can preserve the slashes for the format, the DataType after reading it will turn it as an object. Doing this, write ranging it after processing the datable would change the Number Format from Custom to General. Is there a way to preserve the Number Format after reading ranging? Thank you.
This is actually what my current process right now. Problem is, although it may looks like it uses the same Number Format. Excel doesn’t seem to recognized the dates in the said column, as legit date. Take a look at this one.
I did this before. Create a New Data Column set as DateTime, Convert Current values to ShortDateString or Just Date Time, then write range. Although this works well for DateTime, my problem is I need to use the Custom Number Format.
Although they may seem to look the same(Both in MM/DD/YYYY format) unlike in the source file, Converting the Number Format of the Output File to other format(Like Long Date String) looks just the same as other formats. This is my indicator that it is indeed, the same Number Format with the Input File.
I didn’t format it actually, I just left it alone after read ranging. I tried getting the Column Data Type of the Column after read ranging, and it gives me an Object. I’ll try to send a simplified version of the xaml.
Just Tried it, Still the same. I tried converting it to “dd/MM/yyyy” first, to see if the Custom Setting in the Template File would work. Surprisingly, it works if the date’s Month and Date can be interchangble in both date format(Eg, 10/10, 11/12) But Dates like 02/24/2022 and 12/13/2022 doesn’t seem to work.