How to use Spritesheet/textureatlas to set texture for element in

I am trying to create a spritesheet and use it in code to set texture for a element
Any help?

Hi @Yathiraj_Karkera and welcome,

Take a look at the following engine example, it showcases how to do that fully in code:

Thank you for the response.
but i already created the UI using the editor and used images, Now i want convert those images in to spritesheet and use it.