sed replace with fixed length

$ cat template
s.noName
$ sed "s/s.no/1/" template > out
$ sed "s/s.no/100/" template >>out
$ cat out
1Name
100Name
1  Name
100Name
sed "s/s.no/1  /" template
sed "s/s.no/$sno/" template >>out

Use printf to create the sed script maybe? Or replace everything with three spaces and then overwrite as many as necessary?

Do you get the numbers from a file?

Regards

sed 's/^s\.no//' 65152_noname.d | awk ' BEGIN { ctr=1 } { printf("%-3s %-s\n", ctr, $0); ctr+=1 }' 

yes, I do get the number from input data file

Post examples of the 2 files in the exact format.