PHP Spreadsheet Laravel Dropdown allowing only 255 characters ,How to exceed Character limit? ← (PHP, Laravel)

one text

Im using PHP Spreadsheet in Laravel and i need to show list of states in dropdown,Im not able to show states once 255 character limit is passed ,I searched in Stackoverflow but every answer is not helpful and confusing,Can anyone explain how i can exceed character limit ?

    $spreadsheet = new Spreadsheet();
    $sheet = $spreadsheet->getActiveSheet();
    $sheet->SetCellValue( "A1", "Country" );
    $sheet->SetCellValue( "B1", "State" );
    $sheet->SetCellValue( "C1", "City" );
    $sheet->SetCellValue( "D1", "Location" );
    $sheet->SetCellValue( "A2", "India" );
            $getstate = DB::table('states')->where('status',1)->get();
            foreach($getstate as $st)
            {
                $states.=$st->state_name.",";
            }
        $state = rtrim($states, ',');
        $objValidation = $sheet->getCell('B2')->getDataValidation();
        $objValidation->setType(\PhpOffice\PhpSpreadsheet\Cell\DataValidation::TYPE_LIST );
        $objValidation->setErrorStyle( \PhpOffice\PhpSpreadsheet\Cell\DataValidation::STYLE_INFORMATION);
        $objValidation->setAllowBlank(false);
        $objValidation->setShowInputMessage(true);
        $objValidation->setShowErrorMessage(true);
        $objValidation->setShowDropDown(true);
        $objValidation->setErrorTitle('Input error');
        $objValidation->setError('Value is not in list.');
        $objValidation->setPromptTitle('Pick from list');
        $objValidation->setPrompt('Please pick a value from the drop-down list.');
        $objValidation->setFormula1('"'.$state.'"');//note this!
        $writer = new Xlsx($spreadsheet);
        $writer->save('php.xlsx');

If i open sheet it gives error.Please guide me on how to do it

Source