If explode is used in AutoLISP you might have notice that it only accepts one object. To be able to explode many objects or a selection set make use of qaflags.

(setvar "qaflags" 1)
(command "._explode" (ssget) "")
(setvar "qaflags" 0)

To be on the safe side error handling needs to be added so qaflags can be set to 0 even if the program fails.