public void CreatenNewFormSheet(Guid formId)
        {
            Entity form = CRMOpHelper.GetForm(formId);

            if (form != null && form.Contains("name") && form.Contains("formxml") && form.Contains("objecttypecode"))
            {
                GlobalApplicationData data = GlobalApplicationData.Instance;
                string   sheetName         = string.Format("{0} - {1}", form["name"].ToString(), form["objecttypecode"].ToString());
                FormType formObj           = FormXmlMapper.MapFormXmlToObj(form.Attributes["formxml"].ToString());
                CreatenNewExcelSheet(sheetName, new FormExcelSheetsInfo(formId, form.Attributes["formxml"].ToString(), formObj));
                data.eSheetsInfomation.getCurrentSheet().language = GlobalApplicationData.Instance.currentLanguage;
                ExcelOperations.RefreshFormSheet(data.eSheetsInfomation.getCurrentSheet());
            }
        }
        public void RefreshCurrentFormSheet()
        {
            GlobalApplicationData data = GlobalApplicationData.Instance;

            if (data.eSheetsInfomation.getCurrentSheet().sheetType == ExcelSheetInfo.ExcelSheetType.form)
            {
                Entity form = CRMOpHelper.GetForm(Guid.Parse(data.eSheetsInfomation.getCurrentSheet().objectName));
                if (form != null && form.Contains("name") && form.Contains("formxml") && form.Contains("objecttypecode"))
                {
                    string   sheetName = string.Format("{0} - {1}", form["name"].ToString(), form["objecttypecode"].ToString());
                    FormType formObj   = FormXmlMapper.MapFormXmlToObj(form.Attributes["formxml"].ToString());
                    data.eSheetsInfomation.getCurrentSheet().language = GlobalApplicationData.Instance.currentLanguage;
                    ExcelOperations.RefreshFormSheet(data.eSheetsInfomation.getCurrentSheet());
                }
            }
        }