public async Task SaveApplicationData(ApplicationData data) {
            if (saveInProgress) {
                return;
            }

            saveInProgress = true;

            ExcelPackage.LicenseContext = LicenseContext.NonCommercial;
            await Task.Factory.StartNew(async () => {
                using var package = new ExcelPackage();
                // Add a new worksheet to the empty workbook
                AddApplicationDataToExcelPackage(package, data);

                // Set some document properties
                package.Workbook.Properties.Title = "Envelopes";
                package.Workbook.Properties.Author = "Tristan Kells";
                package.Workbook.Properties.Comments =
                    "This sample demonstrates how to create an Excel workbook using EPPlus";

                // Set some extended property values
                package.Workbook.Properties.Company = "EPPlus Software AB";

                // Set some custom property values
                package.Workbook.Properties.SetCustomPropertyValue("Checked by", "Jan Källman");
                package.Workbook.Properties.SetCustomPropertyValue("AssemblyName", "EPPlus");

                // Save our new workbook in the output directory and we are done!
                await fileProcessor.SaveAs(package);
            });

            saveInProgress = false;
        }