Initial commit taken from jQuery.sheet, so reusable in other libs.