All examples are working fine, pleaase check your code and phpdocx/server log . About these lines:
$docx->addTemplateVariable(’EMAIL’, ’sonal’);
$docx->addTemplateVariable(’HELLO’, ‘Hellooooooooooo’);
You can't replace a variable if the placeholder doesn't exist in template. And the included example doesn't have EMAIL, HELLO placeholders; you must add them to template before replacing them.