diff --git a/lib/spout/src/Spout/Writer/Common/Sheet.php b/lib/spout/src/Spout/Writer/Common/Sheet.php
index f6a966b..0282266 100644
--- a/lib/spout/src/Spout/Writer/Common/Sheet.php
+++ b/lib/spout/src/Spout/Writer/Common/Sheet.php
@@ -75,10 +75,10 @@ class Sheet
      */
     public function setName($name)
     {
+        $name = substr($name, 0, self::MAX_LENGTH_SHEET_NAME);
         if (!$this->isNameValid($name)) {
             $errorMessage = "The sheet's name is invalid. It did not meet at least one of these requirements:\n";
             $errorMessage .= " - It should not be blank\n";
-            $errorMessage .= " - It should not exceed 31 characters\n";
             $errorMessage .= " - It should not contain these characters: \\ / ? * : [ or ]\n";
             $errorMessage .= " - It should be unique";
             throw new InvalidSheetNameException($errorMessage);
