One call to gsub (and some regex magic based on @Andrie's answer) can do this. See ?regexp for details on what I used in the pattern and replacement (back-reference) arguments.
gsub("^(\\d+_).*_(\\d+_\\w*).xls", "\\1\\2", z)
# [1] "1_12_sep" "2_15_aug"