Closed formulas for the character of the symmetric group
Giving explicit formulas for the characters is the content of the recent article "An explicit formula for the characters of the symmetric group" by Michel Lassalle : https://link.springer.com/article/10.1007/s00208-007-0156-5.
For generalizing the formulas in your question, see http://www.combinatorics.org/ojs/index.php/eljc/article/view/v16i2r19 and Examples 1.7.13 and 1.7.14 in Macdonald's Symmetric Functions and Hall Polynomials, 2nd ed. For a different formula, see https://www.researchgate.net/publication/227299451_Stanley%27s_Formula_for_Characters_of_the_Symmetric_Group.