public string MailMerge([FromBody] ExportData exportData)
        {
            Byte[]       data   = Convert.FromBase64String(exportData.documentData.Split(',')[1]);
            MemoryStream stream = new MemoryStream();

            stream.Write(data, 0, data.Length);
            stream.Position = 0;
            try
            {
                Syncfusion.DocIO.DLS.WordDocument document = new Syncfusion.DocIO.DLS.WordDocument(stream, Syncfusion.DocIO.FormatType.Docx);
                document.MailMerge.RemoveEmptyGroup      = true;
                document.MailMerge.RemoveEmptyParagraphs = true;
                document.MailMerge.ClearFields           = true;
                document.MailMerge.Execute(CustomerDataModel.GetAllRecords());
                document.Save(stream, Syncfusion.DocIO.FormatType.Docx);
            }
            catch (Exception)
            { }
            string sfdtText = "";

            Syncfusion.EJ2.DocumentEditor.WordDocument worddocument = Syncfusion.EJ2.DocumentEditor.WordDocument.Load(stream, Syncfusion.EJ2.DocumentEditor.FormatType.Docx);
            sfdtText = Newtonsoft.Json.JsonConvert.SerializeObject(worddocument);
            worddocument.Dispose();
            return(sfdtText);
        }
        // Import file from client side
        public string Import(IFormCollection data)
        {
            if (data.Files.Count == 0)
            {
                return(null);
            }
            Stream    stream = new MemoryStream();
            IFormFile file   = data.Files[0];
            int       index  = file.FileName.LastIndexOf('.');
            string    type   = index > -1 && index < file.FileName.Length - 1 ?
                               file.FileName.Substring(index) : ".docx";

            file.CopyTo(stream);
            stream.Position = 0;

            EJ2DocumentEditor.WordDocument document = EJ2DocumentEditor.WordDocument.Load(stream, GetFormatType(type.ToLower()));
            string json = Newtonsoft.Json.JsonConvert.SerializeObject(document);

            document.Dispose();
            return(json);
        }