I don't think it is very clear what you are asking. Do you mean your files are in an alternate format and you need to convert them? And by analyze, do you mean old-style analyze, or two part nifti analyze (which still has a .img and .hdr file)?
All spm functions should work with 2 part analyze format. If you need to convert nii to img/hdr, a quick google search will reveal many possibilities. Alternately if you have the dicom files you can run spm's dicom conversion which defaults to outputting img/hdr.