I've never had to use JavaScript, but I've done the *1 or &"" in Excel to force conversion to the desired type... yes, let's mercifully lay the veil of forgetting over this.
(eta: didn't finish the thought - I'd assume SQL influenced Excel, since it's older.)