Here the steps to reproduce the error:
1.- Create a site with brackets in its name: My [Site]
2.- Go to assigments and create one a make a submission.
3.- Try to download submissions as spreadsheet.
If you take a look at the code in https://source.sakaiproject.org/svn/assignment/trunk/assignment-impl/impl/src/java/org/sakaiproject/assignment/impl/BaseAssignmentService.java you will see this:
// a tab title in a workbook have a maximum length of 31 chars.
// otherwise an Exception will been thrown "Sheet name cannot be blank, greater than 31 chars, or contain any of /*?"
// we truncate it if it's too long
String sheetTitle = siteTitle;
int siteTitleLength = sheetTitle.length();
if (siteTitleLength > 31)
HSSFSheet sheet = wb.createSheet(Validator.escapeZipEntry(sheetTitle));
But escapeZipEntry method obviously filters characters not valid for a ZipEntry, but not for a sheet title. See https://source.sakaiproject.org/svn/kernel/trunk/kernel-util/src/main/java/org/sakaiproject/util/Validator.java
protected static final String INVALID_CHARS_IN_ZIP_ENTRY = "/\\%:*?'\"";
So, a new method escapeSheetTitleEntry needed.