Work done by a force at an angle to the direction of motion can be calculated by using the component of the force that is in the direction of the motion.
W = Fxcosθ
In the diagram below, the horizontal component is Fcosθ and the vertical component is Fsinθ
W = Fxcosθ
In the diagram below, the horizontal component is Fcosθ and the vertical component is Fsinθ