javascript - Google Spreadsheet - string value getting converted to date? -
guys have google sheet column taskname , type plain text. if enter value 5 jul under column stored 5 jul.
i add value in sheet using code similar this:
var name = "5 jul"; var url = "&taskname=" + encodeuricomponent(name); var encodedstring = encodereservedcharacters(url); var htmlval = "<html><script src='" + url + "?action=addname&groupid=" + groupid + "&prefix=addnamecallback" + "&" + encodedstring + "'><'/script><'/html>"; $("#checkscript").html(htmlval); function encodereservedcharacters(querystring) { var reservedcharwithequivalenthexcode = { "(": "%28", ")": "%29", "/": "%2f", "*": "%2a", "'": "%27" }; querystring = querystring.replace(/[()/*']/g, function(match) { return reservedcharwithequivalenthexcode[match]; }); return querystring; }; groupid worksheet id using oauth token
sheet updated instead of "5 jul", 7/5/2015 stored. how solve this?
i had prepend tick (') cell contents interpreted date new google sheets, such "2015-06" (now insert "'2015-06")
Comments
Post a Comment