Multiply by $y'$, we get $((y')^2/2+e^y-ay)'=0$, so $(y')^2/2+e^y-ay=c$, $y'=f(y)$, where $f(y)=\pm \sqrt{2c+2ay-2e^y}$, so $dx/dy=1/f(y)$, $x$ is antiderivative of $1/f(y)$. I doubt that this antiderivative is expressed in elementary functions for general $a,c$.