凸( ̄ヘ ̄)

This commit is contained in:
Polina 2024-05-31 19:11:00 +04:00
parent ff7ff41707
commit 79ac3cf662
4 changed files with 43 additions and 40 deletions

View File

@ -29,9 +29,9 @@ namespace UniversityBusinessLogics.OfficePackage
CreateParagraph(new WordParagraph
{
Texts = new List<(string, WordTextProperties)>
{
(text, new WordTextProperties { Size = "24" })
},
{
(text, new WordTextProperties { Size = "24" })
},
TextProperties = new WordTextProperties
{
Size = "24",

View File

@ -188,17 +188,17 @@ namespace UniversityBusinessLogics.OfficePackage.Implements
_shareStringPart.SharedStringTable = new SharedStringTable();
}
// Create a new worksheet part
var workbookPart = _spreadsheetDocument.AddWorkbookPart();
workbookPart.Workbook = new Workbook();
// Создаем лист в книгу
var worksheetPart = workbookpart.AddNewPart<WorksheetPart>();
worksheetPart.Worksheet = new Worksheet(new SheetData());
// Set the new worksheet as the active worksheet
var sheets = workbookPart.Workbook.AppendChild(new Sheets());
var sheet = new Sheet
// Добавляем лист в книгу
var sheets = _spreadsheetDocument.WorkbookPart.Workbook.AppendChild(new Sheets());
var sheet = new Sheet()
{
Id = _spreadsheetDocument.WorkbookPart.GetIdOfPart(worksheetPart),
SheetId = (uint)sheets.ChildElements.Count + 1,
Name = "Sheet1" // You can change the name as needed
SheetId = 1,
Name = "Лист"
};
sheets.Append(sheet);
@ -290,7 +290,10 @@ namespace UniversityBusinessLogics.OfficePackage.Implements
}
}
var mergeCell = new MergeCell { Reference = excelParams.Merge };
var mergeCell = new MergeCell()
{
Reference = new StringValue(excelParams.Merge)
};
mergeCells.Append(mergeCell);
}

View File

@ -144,3 +144,4 @@ namespace UniversityBusinessLogics.OfficePackage.Implements
}
}
}

View File

@ -18,7 +18,6 @@ builder.Services.AddSession(); //
builder.Services.AddTransient<IClientLogic, ClientLogic>();
builder.Services.AddTransient<IPurchaseLogic, PurchaseLogic>();
builder.Services.AddTransient<IOperationLogic, OperationLogic>();
builder.Services.AddTransient<IReportLogic, ReportLogic>();
builder.Services.AddTransient<IPaymentLogic, PaymentLogic>();
builder.Services.AddTransient<AbstractSaveToWord, SaveToWord>();