Excel .csv Conversion - Date-Formatting keeps returning even with prior formatting

%3CLINGO-SUB%20id%3D%22lingo-sub-1369737%22%20slang%3D%22en-US%22%3EExcel%20.csv%20Conversion%20-%20Date-Formatting%20keeps%20returning%20even%20with%20prior%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1369737%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20an%20issue%20regarding%20the%20formatting%20of%20one%20column%20in%20a%20dataset.%20To%20shortly%20introduce%20it%3A%20We%20have%20a%20question%20on%20how%20many%20books%20participants%20have%20at%20home.%20They%20can%20select%20'none'%2C%20'1-10'%2C%20'11-25'%2C%20etc.%20Excel%20being%20Excel%2C%20it%20represents%20those%20two%20mentioned%20as%20dates.%20Before%20converting%20my%20.xlxs-file%20to%20.csv%2C%20I%20formatted%20this%20column%20to%20be%20non-date%20(I%20tried%20Text%2C%20Custom%20(with%20choice%20'0')%2C%20and%20some%20other%20options%2C%20all%20have%20the%20same%20issue).%20After%20this%20formatting%2C%20I%20exported%20the%20.xlxs%20as%20a%20.csv%20(not%20UTF-8%20.csv)%20and%20it%20represents%20it%20just%20fine%20('11-25'%20stays%20'11-25'%20rather%20than%20'nov-25').%20However%2C%20when%20working%20in%20this%20file%20(it's%20continually%20updated%2C%20normally)%2C%20the%20trouble%20starts.%20Mind%2C%20it's%20already%20in%20a%20.csv%20format%20by%20now%2C%20and%20the%20formatting%20was%20done%20prior%20to%20the%20conversion%20to%20.csv.%20Once%20I%20save%20this%20harmless%20looking%20file%2C%20the%20date-format%20comes%20back%20like%20a%20zombie%20rising%20from%20the%20dead%20and%20there's%20seemingly%20nothing%20I%20can%20do%20to%20change%20it.%20All%20changes%20to%20the%20format%20afterwards%20result%20in%20a%20weird%20integer-string%20of%205%20numbers%20(45962%2C%20in%20various%20forms%20depending%20on%20the%20format%20but%20with%20these%205%20integers%20there).%3C%2FP%3E%3CP%3EI%20already%20had%20contact%20with%202%20chat-services%20on%20the%20issue%2C%20and%20together%20with%20the%20internet%2C%20they%20suggested%20that%20I%20could%20create%20a%20new%20'Custom'-format%20(for%20instance%2C%20by%20saying%20I%20expect%20my%20data%20to%20be%20'11-25'%3B%20see%20%3CA%20href%3D%22https%3A%2F%2Fsupport.office.com%2Fen-us%2Farticle%2FFormat-a-date-the-way-you-want-8E10019E-D5D8-47A1-BA95-DB95123D273E%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsupport.office.com%2Fen-us%2Farticle%2FFormat-a-date-the-way-you-want-8E10019E-D5D8-47A1-BA95-DB95123D273E%3C%2FA%3E).%20However%2C%20this%20would%20be%20relevant%20if%20I%20only%20had%2011-25%20as%20potential%20date-conversion-problem%2C%20but%201-10%20will%20be%2C%20in%20infinite%20American%20wisdom%2C%20also%20revert%20back%20to%20a%20backwards%20date-format%20(jan-10).%3C%2FP%3E%3CP%3EAny%20idea%20on%20how%20to%20fix%20this%3F%20At%20the%20moment%2C%20I%20can%20only%20ever%20convert%20the%20file%20once%2C%20and%20never%20again%20because%20I%20cannot%20make%20change%20without%20it%20switching%20back%20to%20a%20date-format.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHelp%20is%20greatly%20appreciated%2C%20as%20I'm%20quite%20close%20to%20committing%20murder%20on%20my%20laptop%20if%20it%20keeps%20annoying%20me%20like%20this.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1369737%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1371089%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20.csv%20Conversion%20-%20Date-Formatting%20keeps%20returning%20even%20with%20prior%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1371089%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F659505%22%20target%3D%22_blank%22%3E%40ThomasBraasETH%3C%2FA%3E%26nbsp%3BWhen%20you%20save%20something%20like%20%221-10%22%20to%20a%20csv%20file%20it%20just%20becomes%20a%20string%20of%20characters.%20No%20information%20regarding%20the%20Excel%20format%20(as%20text)%20of%20that%20string%20is%20saved%20with%20the%20csv%20file.%20When%20you%20then%20open%20the%20file%20in%20Excel%2C%20you%20should%20see%20a%20text%20import%20wizard%20where%20you%20have%20to%20go%20through%20the%20steps%20presented%20to%20you.%20In%20step%203%2C%20you%20need%20to%20specify%20the%20data%20type%20as%20Text.%20If%20you%20skip%20all%20of%20it%20and%20just%20press%20Finish%20at%20the%20beginning%2C%20Excel%20tries%20to%20be%20smart%20and%20it%20will%20guess%20the%20data%20type%20for%20you.%20Hence%2C%20entries%20like%201-10%20and%2011-25%20could%20be%20dates.%20If%20it%20encounters%2013-18%20Excel%20will%20conclude%20that%20this%20can%20not%20be%20a%20date%20and%20imports%20it%20as%20a%20text.%20So%2C%20it's%20important%20that%20you%20do%20the%20data%20typing%20yourself.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnd%20by%20the%20way%2C%20the%20%22weird%205%20digit%20number%22%2045962%20is%20actually%20the%20day%20number%20in%20the%20internal%20Excel%20calendar%20for%20November%2011%2C%202025.%20The%20day%20counter%20start%20at%201%20for%20January%201%2C%201900.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1371991%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20.csv%20Conversion%20-%20Date-Formatting%20keeps%20returning%20even%20with%20prior%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1371991%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3EI'm%20not%20exactly%20sure%20if%20that%20solves%20the%20problem%20I've%20been%20having%2C%20or%20I'm%20simply%20not%20getting%20your%20idea.%20I%20already%20have%20a%20data-file%2C%20an%20.xlxs%20file.%20I%20converted%20this%20successfully%20to%20a%20.csv%2C%20still%20in%20Excel.%20I%20get%20that%20Excel%20is%20transforming%20the%20data%20automatically%20because%20I%20have%20not%20specified%20each%20and%20every%20column.%20I%20did%20that%20because%20I%20don't%20care%20about%20the%2050%20other%20columns%20in%20my%20datafile%20but%20only%20the%20one%20column%20that%20actually%20causes%20this%20whole%20headache.%20As%20such%2C%20I%20successfully%20transformed%20the%20one%20column%20I%20was%20interested%20in%20and%20if%20I%20don't%20change%20anything%2C%20that%20formatting%20is%20still%20there%20in%20the%20.csv%20file.%20The%20moment%20I%20add%20any%20row%20in%20that%20.csv%20file%2C%20and%20save%20the%20file%20(again%2C%20as%20.csv%2C%20as%20it%20already%20was)%2C%20it%20removes%20the%20formatting%20it%20had%20before%20and%20that%20one%20column%20suddenly%20appears%20as%20date%20again.%3C%2FP%3E%3CP%3EAs%20such%2C%20I'm%20not%20importing%20text%20into%20excel%2C%20the%20file%20is%20an%20.xlxs%20file%20with%20a%20column%20that%20could%20be%20regarded%20as%20text%2C%20so%20to%20speak.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1372065%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20.csv%20Conversion%20-%20Date-Formatting%20keeps%20returning%20even%20with%20prior%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1372065%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F659505%22%20target%3D%22_blank%22%3E%40ThomasBraasETH%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECould%20you%20perform%20a%20global%20edit%20and%20replace%20the%20soft%20hyphen%20'-'%20(hex%2000AD)%20by%20an%20En%20Dash%20'%3CFONT%3E%E2%80%93%3C%2FFONT%3E'%20(hex%202013)%20or%20possibly%20a%20non-breaking%20hyphen%20(hex%202010).%26nbsp%3B%20These%20would%20be%20visually%20similar%20to%20the%20original%20but%20Excel%20would%20no%20longer%20try%20to%20convert%20the%20strings%20into%20date%20values.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1373173%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20.csv%20Conversion%20-%20Date-Formatting%20keeps%20returning%20even%20with%20prior%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1373173%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F214174%22%20target%3D%22_blank%22%3E%40Peter%20Bartholomew%3C%2FA%3EIn%20a%20global%20edit%2C%20do%20you%20mean%20to%20reformat%20the%20column%3F%20Or%20simply%20find%20and%20replace%3F%20Most%20'global%20edit'%20searches%20lead%20me%20back%20to%20reformatting%2C%20it%20seems.%20I%20could%20replace%20all%20the%20different%20hyphens%20I%20guess%2C%20although%20I'm%20not%20sure%20how%20this%20would%20work%20when%20entering%20new%20data%20and%20then%20storing%20it%20again.%20At%20the%20moment%2C%20the%20moment%20I%20save%20the%20file%20after%20the%20conversion%20to%20.csv%2C%20it%20happily%20destroys%20the%20formatting%20already%20in%20place%20and%20I'm%20back%20at%20square%20one.%20After%20I%20did%20that%2C%20I%20can't%20get%20the%20actual%20input%20back%2C%20as%20Excel%20has%20already%20decided%20to%20create%20a%20date-column%20and%20as%20a%20result%2C%20any%20formatting%20automatically%20produces%20this%20string%20counted%20from%2001-01-1900%20I%20believe.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1374468%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20.csv%20Conversion%20-%20Date-Formatting%20keeps%20returning%20even%20with%20prior%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1374468%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F659505%22%20target%3D%22_blank%22%3E%40ThomasBraasETH%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20there%20is%20any%20point%20at%20which%20you%20have%20a%20text%20string%20comprising%3C%2FP%3E%3CP%3E%3CSTRONG%3E2%20digits%2C%20soft%20hyphen%2C%202%20digits%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3Eand%20are%20in%20an%20environment%20with%20an%20editor%2C%20that%20is%20the%20moment%20to%20convert%20the%20soft%20hyphen%20into%20another%20character.%26nbsp%3B%20If%20on%20the%20other%20hand%2C%20you%20already%20have%20a%20mix%20of%20%3CSTRONG%3E15-20%3C%2FSTRONG%3E%2C%20%3CSTRONG%3E15-Oct%3C%2FSTRONG%3E%2C%20%3CSTRONG%3E5-Oct%3C%2FSTRONG%3E%20then%20you%20are%20faced%20with%20the%20task%20of%20unscrambling%20the%20omelette.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20values%20you%20require%20will%20be%20held%20within%20the%20date%20so%20a%20fo%3CSPAN%3Ermula%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CSPAN%3E%3CFONT%3E%3D%20IF(%20ISNUMBER(interval)%2C%20DAY(interval)%20%26amp%3B%20UNICHAR(8208)%20%26amp%3B%20MONTH(interval)%2C%20interval)%3C%2FFONT%3E%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3Ewould%20be%20a%20start%20to%20getting%20a%20column%20that%20you%20can%20%3CSTRONG%3ECopy%20%2F%20Paste%20values%3C%2FSTRONG%3E%20over%20the%20top.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1375273%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20.csv%20Conversion%20-%20Date-Formatting%20keeps%20returning%20even%20with%20prior%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1375273%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F214174%22%20target%3D%22_blank%22%3E%40Peter%20Bartholomew%3C%2FA%3EWell%2C%20the%20weird%20thing%20is%20that%20I'm%20not%20stuck%20with%20the%20omelette%20left%20unscrambling%20when%20I%20initially%20save%20the%20file%20as%20a%20.csv.%20It%20only%20happens%20again%20after%20I%20make%20any%20change%20and%20save%20it%20again.%20As%20we%20get%20the%20data%20from%20a%20different%20program%20entirely%2C%20we%20get%20in%20the%20form%20of%20an%20existing%20.xlxs%20file%2C%20and%20I'm%20not%20sure%20how%20to%20then%20re-edit%20that%20hyphen%20into%20a%20different%20character%20as%20I'm%20not%20making%20the%20.xlxs%20file%20myself%20with%20any%20editor%20of%20sorts.%20Is%20there%20any%20direction%20you%20can%20point%20me%20towards%20to%20get%20that%20going%3F%20Or%20otherwise%2C%20how%20to%20best%20use%20the%20formula%20you%20described%3F%20I'm%20assuming%20this%20has%20to%20utilize%20the%20initial%20column%20and%20then%20transform%20into%20a%20new%20column%20(meaning%20I'd%20likely%20have%20to%20do%20this%20every%20time%20I%20get%20additional%20data%2C%20which%20I%20what%20I%20wanted%20to%20prevent).%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1378010%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20.csv%20Conversion%20-%20Date-Formatting%20keeps%20returning%20even%20with%20prior%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1378010%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F659505%22%20target%3D%22_blank%22%3E%40ThomasBraasETH%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20I%20had%20in%20mind%20was%20to%20select%20the%20offending%20column%20in%20Excel%20before%20it%20is%20corrupted%20and%20use%20Replace%20(Ctrl%2BH)%20to%20replace%20the%20soft%20hyphen%20by%20another%20character.%3C%2FP%3E%3CP%3EAvoiding%20the%20use%20of%20CSV%20files%20would%20appear%20the%20be%20good%20abut%2C%20assuming%20that%20is%20not%20possible%2C%20and%20the%20eggs%20are%20broken%20then%20type%20the%20formula%20into%20a%20helper%20column%20and%20use%20the%20resulting%20values%20from%20there.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1379705%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20.csv%20Conversion%20-%20Date-Formatting%20keeps%20returning%20even%20with%20prior%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1379705%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F214174%22%20target%3D%22_blank%22%3E%40Peter%20Bartholomew%3C%2FA%3E%26nbsp%3BJust%20tried%20it%20and%20the%20result%20is%20that%20all%20hyphen%20are%20turned%20into%20question%20marks%2C%20likely%20because%20the%20different%20hyphen%20is%20not%20supported%20('26%3F50'%20is%20the%20result).%20So%20it%20works%20well%20before%20the%20conversion%20to%20.csv%20but%20stops%20working%20after.%20Unfortunately%2C%20we%20need%20the%20files%20in%20.csv%20format%20to%20be%20in%20compliance%20with%20our%20database%2C%20so%20working%20in%20.xlxs%20is%20not%20an%20option.%3CBR%20%2F%3EHow%20would%20I%20use%20that%20formula%20exactly%3F%20I%20would%20imagine%20this%20is%20a%20bug%20that%20needs%20fixing%2C%20considering%20Excel%20undoes%20an%20earlier%20action%20because%20it%20saves%20a%20file%2C%20but%20I%20can't%20wait%20for%20that%20to%20ever%20happen.%20If%20I%20can%20use%20that%20formula%20to%20create%20a%20new%20column%20that%20reverts%20the%205-digit%20integer%20string%20to%20what%20it%20originally%20should%20be%2C%20I'm%20okay%20with%20that.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1385176%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20.csv%20Conversion%20-%20Date-Formatting%20keeps%20returning%20even%20with%20prior%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1385176%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F659505%22%20target%3D%22_blank%22%3E%40ThomasBraasETH%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELooks%20like%20you%20need%20to%20stick%20to%20the%20regular%20ASCII%20keyboard%20characters%20such%20as%20tilde%20%22~%22%2C%20underscore%20%22_%22%20or%20vertical%20line%20%22%7C%22.%26nbsp%3B%20The%20attraction%20of%20the%20non-breaking%20hyphen%20or%20n-dash%20was%20their%20visual%20similarity%20to%20the%20normal%20hyphen.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20I%20understand%20it%2C%20anything%20you%20do%20by%20formatting%20is%20lost%20once%20you%20convert%20to%20CSV.%26nbsp%3B%20I%20imagine%20the%20damage%20is%20done%20once%20you%20bring%20a%20CSV%20file%20back%20into%20Excel%20and%20it%20tries%20to%20'make%20sense'%20of%20it.%26nbsp%3B%20Viewed%20in%20a%20text%20editor%20and%20the%20CSV%20file%20is%20probably%20still%20OK.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20formula%20idea%20only%20kicks%20in%20once%20the%20damage%20is%20done%20and%20you%20have%20a%20mix%20of%20text%2C%20US%20dates%20and%20'rest%20of%20world'%20dates.%26nbsp%3B%20By%20inserting%20a%20formula%20column%20that%20returns%20the%20day%20and%20month%20for%20any%20date%20(a%20number)%20as%20text%20you%20get%20to%20see%20what%20was%20in%20the%20CSV%20file%20before%20Excel%20helpfully%20scrambled%20it.%26nbsp%3B%20Copy%2Fpaste%20values%20could%20be%20used%20to%20overwrite%20the%20misbehaving%20ranges%20with%20something%20more%20acceptable.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENot%20that%20I%20would%20consider%20this%20a%20well-ordered%20process.%26nbsp%3B%20I%20really%20dislike%20such%20manual%20processing.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOne%20further%20thought.%26nbsp%3B%20Have%20you%20tried%20importing%20the%20data%20using%20Power%20Query.%26nbsp%3B%20That%20should%20provide%20the%20opportunity%20to%20edit%20and%20adjust%20the%20number%20formats%20before%20trying%20to%20load%20to%20an%20Excel%20table.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1395509%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20.csv%20Conversion%20-%20Date-Formatting%20keeps%20returning%20even%20with%20prior%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1395509%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F214174%22%20target%3D%22_blank%22%3E%40Peter%20Bartholomew%3C%2FA%3ENo%20never%20tried%20Power%20Query%2C%20but%20I%20also%20don't%20think%20it's%20possible.%20We%20have%20a%20scanning%20system%20in%20place%20which%20delivers%20all%20data%20already%20in%20excel-files.%20So%20there's%20only%20importing%20from%20one%20type%20of%20excel-file%20to%20a%20.csv.%20We%20don't%20have%20a%20text-file%20of%20raw%20data%20which%20is%20then%20exported%20to%20.xlxs.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1395662%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20.csv%20Conversion%20-%20Date-Formatting%20keeps%20returning%20even%20with%20prior%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1395662%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F659505%22%20target%3D%22_blank%22%3E%40ThomasBraasETH%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOpening%20csv%20file%20Excel%20performs%20all%20operation%20as%20with%20excel%20file%2C%20that's%20how%20the%20parser%20works.%20For%20example%2C%20if%20you%20have%20comma%20delimited%20file%20with%20one%20text%20string%3C%2FP%3E%0A%3CP%3E1%2C2%2C%3Da1%2Bb1%3C%2FP%3E%0A%3CP%3Ean%20open%20it%20in%20Excel%2C%20result%20in%20a1%2C%20b1%20and%20c1%20will%20be%3C%2FP%3E%0A%3CP%3E1%202%203%3C%2FP%3E%0A%3CP%3Eand%20working%20formula%20in%20C1.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20prevent%20default%20converting%20of%20texts%20to%20numbers%20and%20dates%20perhaps%20the%20easiest%20way%20is%20to%20add%20the%20space%20at%20the%20front%20of%20text%20which%20could%20be%20converted%2C%20or%20two%20single%20apostrophes%2C%20but%20it's%20more%20visible.%3C%2FP%3E%0A%3CP%3EIf%20such%20data%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20319px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F192299iA874B8EF920F280C%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3Esave%20as%20csv%20and%20open%20it%20in%20Excel%2C%20we%20will%20have%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20314px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F192300i3CD78DD92A5227F3%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3Bi.e.%20only%20A2%20is%20converted.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOtherwise%20Get%20Data%20from%20Text%20File%20using%20legacy%20connector%20and%20applying%20Text%20format%20to%20all%20columns%20on%20the%20third%20step%20of%20the%20wizard.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1395900%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20.csv%20Conversion%20-%20Date-Formatting%20keeps%20returning%20even%20with%20prior%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1395900%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F659505%22%20target%3D%22_blank%22%3E%40ThomasBraasETH%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%2C%20at%20any%20point%20in%20the%20process%20you%20have%20a%20valid%20file%20(.txt%2C%20.csv%2C%20.xlsx)%2C%20Power%20Query%20will%20import%20it%20and%2C%20assuming%20the%20data%20is%20laid%20out%20as%20a%20database%20table%2C%20it%20can%20be%20loaded%20to%20a%20Table%20in%20Excel.%26nbsp%3B%20If%20you%20chose%20you%20could%20separate%20the%20upper%20and%20lower%20limits%20into%20two%20fields%20or%20replace%20the%20hyphen%20by%20underscore%20(say)%20before%20loading%20to%20the%20Excel%20table.%26nbsp%3B%20Fresh%20data%20could%20be%20appended%20from%20multiple%20files.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20need%20more%20flexibility%2C%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%20's%20approach%20should%20offer%20that.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

Hi all,

 

I have an issue regarding the formatting of one column in a dataset. To shortly introduce it: We have a question on how many books participants have at home. They can select 'none', '1-10', '11-25', etc. Excel being Excel, it represents those two mentioned as dates. Before converting my .xlxs-file to .csv, I formatted this column to be non-date (I tried Text, Custom (with choice '0'), and some other options, all have the same issue). After this formatting, I exported the .xlxs as a .csv (not UTF-8 .csv) and it represents it just fine ('11-25' stays '11-25' rather than 'nov-25'). However, when working in this file (it's continually updated, normally), the trouble starts. Mind, it's already in a .csv format by now, and the formatting was done prior to the conversion to .csv. Once I save this harmless looking file, the date-format comes back like a zombie rising from the dead and there's seemingly nothing I can do to change it. All changes to the format afterwards result in a weird integer-string of 5 numbers (45962, in various forms depending on the format but with these 5 integers there).

I already had contact with 2 chat-services on the issue, and together with the internet, they suggested that I could create a new 'Custom'-format (for instance, by saying I expect my data to be '11-25'; see https://support.office.com/en-us/article/Format-a-date-the-way-you-want-8E10019E-D5D8-47A1-BA95-DB95...). However, this would be relevant if I only had 11-25 as potential date-conversion-problem, but 1-10 will be, in infinite American wisdom, also revert back to a backwards date-format (jan-10).

Any idea on how to fix this? At the moment, I can only ever convert the file once, and never again because I cannot make change without it switching back to a date-format.

 

Help is greatly appreciated, as I'm quite close to committing murder on my laptop if it keeps annoying me like this.

 

12 Replies
Highlighted

@ThomasBraasETH When you save something like "1-10" to a csv file it just becomes a string of characters. No information regarding the Excel format (as text) of that string is saved with the csv file. When you then open the file in Excel, you should see a text import wizard where you have to go through the steps presented to you. In step 3, you need to specify the data type as Text. If you skip all of it and just press Finish at the beginning, Excel tries to be smart and it will guess the data type for you. Hence, entries like 1-10 and 11-25 could be dates. If it encounters 13-18 Excel will conclude that this can not be a date and imports it as a text. So, it's important that you do the data typing yourself.

 

And by the way, the "weird 5 digit number" 45962 is actually the day number in the internal Excel calendar for November 11, 2025. The day counter start at 1 for January 1, 1900.

Highlighted

@Riny_van_EekelenI'm not exactly sure if that solves the problem I've been having, or I'm simply not getting your idea. I already have a data-file, an .xlxs file. I converted this successfully to a .csv, still in Excel. I get that Excel is transforming the data automatically because I have not specified each and every column. I did that because I don't care about the 50 other columns in my datafile but only the one column that actually causes this whole headache. As such, I successfully transformed the one column I was interested in and if I don't change anything, that formatting is still there in the .csv file. The moment I add any row in that .csv file, and save the file (again, as .csv, as it already was), it removes the formatting it had before and that one column suddenly appears as date again.

As such, I'm not importing text into excel, the file is an .xlxs file with a column that could be regarded as text, so to speak.

Highlighted

@ThomasBraasETH 

Could you perform a global edit and replace the soft hyphen '-' (hex 00AD) by an En Dash '' (hex 2013) or possibly a non-breaking hyphen (hex 2010).  These would be visually similar to the original but Excel would no longer try to convert the strings into date values.

Highlighted

@Peter BartholomewIn a global edit, do you mean to reformat the column? Or simply find and replace? Most 'global edit' searches lead me back to reformatting, it seems. I could replace all the different hyphens I guess, although I'm not sure how this would work when entering new data and then storing it again. At the moment, the moment I save the file after the conversion to .csv, it happily destroys the formatting already in place and I'm back at square one. After I did that, I can't get the actual input back, as Excel has already decided to create a date-column and as a result, any formatting automatically produces this string counted from 01-01-1900 I believe.

Highlighted

@ThomasBraasETH 

If there is any point at which you have a text string comprising

2 digits, soft hyphen, 2 digits

and are in an environment with an editor, that is the moment to convert the soft hyphen into another character.  If on the other hand, you already have a mix of 15-20, 15-Oct, 5-Oct then you are faced with the task of unscrambling the omelette.

 

The values you require will be held within the date so a formula

= IF( ISNUMBER(interval), DAY(interval) & UNICHAR(8208) & MONTH(interval), interval)

would be a start to getting a column that you can Copy / Paste values over the top.

Highlighted

@Peter BartholomewWell, the weird thing is that I'm not stuck with the omelette left unscrambling when I initially save the file as a .csv. It only happens again after I make any change and save it again. As we get the data from a different program entirely, we get in the form of an existing .xlxs file, and I'm not sure how to then re-edit that hyphen into a different character as I'm not making the .xlxs file myself with any editor of sorts. Is there any direction you can point me towards to get that going? Or otherwise, how to best use the formula you described? I'm assuming this has to utilize the initial column and then transform into a new column (meaning I'd likely have to do this every time I get additional data, which I what I wanted to prevent).

Highlighted

@ThomasBraasETH 

What I had in mind was to select the offending column in Excel before it is corrupted and use Replace (Ctrl+H) to replace the soft hyphen by another character.

Avoiding the use of CSV files would appear the be good abut, assuming that is not possible, and the eggs are broken then type the formula into a helper column and use the resulting values from there.

 

Highlighted

@Peter Bartholomew Just tried it and the result is that all hyphen are turned into question marks, likely because the different hyphen is not supported ('26?50' is the result). So it works well before the conversion to .csv but stops working after. Unfortunately, we need the files in .csv format to be in compliance with our database, so working in .xlxs is not an option.
How would I use that formula exactly? I would imagine this is a bug that needs fixing, considering Excel undoes an earlier action because it saves a file, but I can't wait for that to ever happen. If I can use that formula to create a new column that reverts the 5-digit integer string to what it originally should be, I'm okay with that.

Highlighted

@ThomasBraasETH 

Looks like you need to stick to the regular ASCII keyboard characters such as tilde "~", underscore "_" or vertical line "|".  The attraction of the non-breaking hyphen or n-dash was their visual similarity to the normal hyphen.

 

As I understand it, anything you do by formatting is lost once you convert to CSV.  I imagine the damage is done once you bring a CSV file back into Excel and it tries to 'make sense' of it.  Viewed in a text editor and the CSV file is probably still OK.

 

The formula idea only kicks in once the damage is done and you have a mix of text, US dates and 'rest of world' dates.  By inserting a formula column that returns the day and month for any date (a number) as text you get to see what was in the CSV file before Excel helpfully scrambled it.  Copy/paste values could be used to overwrite the misbehaving ranges with something more acceptable.

 

Not that I would consider this a well-ordered process.  I really dislike such manual processing.

 

One further thought.  Have you tried importing the data using Power Query.  That should provide the opportunity to edit and adjust the number formats before trying to load to an Excel table.

Highlighted

@Peter BartholomewNo never tried Power Query, but I also don't think it's possible. We have a scanning system in place which delivers all data already in excel-files. So there's only importing from one type of excel-file to a .csv. We don't have a text-file of raw data which is then exported to .xlxs.

Highlighted

@ThomasBraasETH 

Opening csv file Excel performs all operation as with excel file, that's how the parser works. For example, if you have comma delimited file with one text string

1,2,=a1+b1

an open it in Excel, result in a1, b1 and c1 will be

1 2 3

and working formula in C1.

 

To prevent default converting of texts to numbers and dates perhaps the easiest way is to add the space at the front of text which could be converted, or two single apostrophes, but it's more visible.

If such data

image.png

save as csv and open it in Excel, we will have

image.png

 i.e. only A2 is converted.

 

Otherwise Get Data from Text File using legacy connector and applying Text format to all columns on the third step of the wizard.

Highlighted

@ThomasBraasETH 

If, at any point in the process you have a valid file (.txt, .csv, .xlsx), Power Query will import it and, assuming the data is laid out as a database table, it can be loaded to a Table in Excel.  If you chose you could separate the upper and lower limits into two fields or replace the hyphen by underscore (say) before loading to the Excel table.  Fresh data could be appended from multiple files.

 

If you need more flexibility, @Sergei Baklan 's approach should offer that.