I have tried with my version and I am getting the output.
here are my observations : -
1.When I am trying to save the excel which is generated through code I am not getting underline in pdf.
2.I opened excel which I saved through code manually and saved it with some other name and then tried converting it to pdf. Now I am ablwe to see the pdf output with underlines.
So I came to a conslusion that excel saved through code is not giving the underlines when saved as pdf but excel saved manually is giving the expected output.
Do I need to give any options while saving.