// Do Make public async Task MakeExcel(string excelPath, string xmlsPath, Encoding encoding) => await Task.Run(() => { ExcelSelect ExcelSelect = new ExcelSelect(); ExcelSelect.PathExelSelect = excelPath; ExcelSelect.SelectInExelFrom = "A1"; ExcelSelect.SelectInExelTo = "Z500"; var a = _excelManager.ListExcelArrayMaker(ExcelSelect); var b = _readXmlFolder.Read(xmlsPath, encoding); _excelMaker.ToMakeExcel(b, a); });
public async Task <object[, ]> ListExcelArrayMaker(ExcelSelect excelSelect) => await Task.Run(() => { Excel.Application excel = new Excel.Application(); excel.Visible = false; excel.Workbooks.Open(excelSelect.PathExelSelect); var exc = (object[, ])excel .Range[excelSelect.SelectInExelFrom + ":" + excelSelect.SelectInExelTo].Value; excel.Quit(); return(exc); });