/// <summary> /// Экспорт спецификации в таблицу Excel /// </summary> private static void ExportTableToSheet(IBookExcel bookExcel, ISpecification specification) => new ResultAppValue <ISheetExcel>(bookExcel.Sheets[0]). ResultVoidOk(sheetExcel => PrepareSheet(sheetExcel, specification.GetSpecificationType())). ResultVoidOk(sheetExcel => CopyTableChunk(sheetExcel, specification.TablesWord));
/// <summary> /// Экспортировать спецификацию из Word /// </summary> public static IResultAppValue <string> Export(IBookExcel bookExcel, ISpecification specification, string filePath) => new ResultAppValue <IBookExcel>(bookExcel). ResultVoidOk(book => ExportTableToSheet(book, specification)). ResultValueOkBind(book => book.SaveAs(filePath));