This topic is locked
[SOLVED]

 Replace before import

5/1/2017 4:21:48 PM
ASPRunner.NET General questions
jadach authorDevClub member

I need to change the value of 55.4µ to 55.40 before record imported via CSV. Does anybody know the way? I tried this but it caused an error.
Import page > before insert record
values["AddedBy"] = XSession.Session["UserID"];

values["Added"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");

values["fldScore2"] = str_Replace("µ","0",values["fldScore2"]);

jadach authorDevClub member 5/1/2017

It appears this works: values["Data3"] = rawvalues["Data3"].Replace("µ", "0");

However, the "µ" is not importing correctly. It comes in as some weird symbol.

jadach authorDevClub member 5/1/2017

OK, after further investigation, the "µ" imports correctly from an Excel file, but not CSV. So I will instruct those importing to use Excel.