public IActionResult CreateWord()
        {
            var fileName = _context.DataFile
                           .Select(i => i.FileName)
                           .First();

            var previousExtension = fileName.Split('.')[1];

            var wordFile = fileName.Replace(previousExtension, "docx");

            var targetFileDirectory = Path.Combine(_hostingEnvironment.ContentRootPath, "Uploads");

            if (!Directory.Exists(targetFileDirectory))
            {
                Directory.CreateDirectory(targetFileDirectory);
            }

            var filePath = Path.Combine(targetFileDirectory, wordFile);

            WordHelper.CreateWordprocessingDocument(filePath);

            var run = new RunFonts
            {
                Ascii = "Calibri"
            };
            var wp = new WordHelper("14.1%", "26.7%", "59.1%", "24", run);

            var lineItems = (from tempData in _context.TempData
                             join category in _context.Category on tempData.Category equals category.Name
                             join lineItem in _context.LineItem on tempData.Name equals lineItem.Name
                             join mapping in _context.Mapping on new { CategoryId = category.Id, LineItemId = lineItem.Id } equals new { mapping.CategoryId, mapping.LineItemId }
                             orderby mapping.LineItemId, lineItem.LineNumber
                             select new
            {
                Category = category.Name,
                mapping.LineItem.Name,
                mapping.Description,
                mapping.LineItem.LineNumber,
                mapping.Id
            })
                            .ToList();

            var model = (from lineItem in lineItems.GroupBy(i => new { i.Category, i.Description })
                         let lineNumbers = lineItem.Select(i => i.LineNumber)
                                           let lineNames = lineItem.Select(i => i.Name)
                                                           select new LineItemViewModel
            {
                Category = lineItem.Key.Category,
                Description = lineItem.Key.Description,
                WordLineNumbers = string.Join(',', lineNumbers),
                Name = string.Join(Environment.NewLine + Environment.NewLine, lineNames)
            }).ToList();

            wp.AddTable(filePath, model);

            var fileBytes = System.IO.File.ReadAllBytes(filePath);

            return(File(fileBytes, MimeTypeHelper.GetContentType(filePath), wordFile));
        }