copy functions used by excel service from Contexts to ContextUtil