private static string generateWorksheetName( PreparedInformation preparedInformation, FileGroup fileGroup, Project project) { // http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/84c0c4d2-52b9-4502-bece-fdc616db05f8 const int maxLength = 31; var ni = (preparedInformation.UseCrypticExcelExportSheetNames ? fileGroup.UniqueID.ToString() : fileGroup.GetNameIntelligent(project)) .Replace('\\', '#') .Replace('/', '#') .Replace('?', '_') .Replace('*', '_') .Replace('[', '_') .Replace(']', '_') .Replace(':', '_'); //var cs = fileGroup.Checksum.ToString(); //var s1 = string.Format( @" ({0})", cs ); //var len = maxLength - s1.Length; var ni2 = FileGroup.ShortenFilePath(ni, maxLength); return(ni2); }