C?? ??? ? Excel ?? ??? 10??? ??
C#?? ??? ? Excel ??? ?? ?? ??? 10??? ????? ?? ??? ??? ? ????.
using OfficeOpenXml; using OfficeOpenXml.Style; using DataTable dt; public void ExportToExcel(DataTable dt, string FileName) { // Create a new Excel package. using (ExcelPackage excelPackage = new ExcelPackage()) { // Create a new worksheet and load the data from the DataTable into it. ExcelWorksheet ws = excelPackage.Workbook.Worksheets.Add(FileName); ws.Cells["A1"].LoadFromDataTable(dt, true); // Apply number formatting to the specified columns (Actual Estimated Price and Approved Estimated Price in this example). int[] decimalColumns = { 1, 2 }; foreach (int col in decimalColumns) { ws.Cells[ws.Dimension.Start.Row, col, ws.Dimension.End.Row, col].Style.Numberformat.Format = "0.00"; } // Other formatting and cleanup code as needed... // Convert the Excel package to a byte array and send it to the browser. byte[] bin = excelPackage.GetAsByteArray(); // ... } }
??? ?? ??? ??? ???? ??? ?? ???? ?? ?? ??? ??? ?? ????. OfficeOpenXML ?????. ?? ?? ??? CustomerName ?? ?? ???? ?? ?? ?? ???? ?? ???? ???? ?? ??? ???? ??? ?????.
const int headerRow = 1; ws.Cells[headerRow, 1, headerRow, 2].Merge = true; ws.Cells[headerRow, 1].Value = "CustomerName"; // ... for (int col = 1; col <= ws.Dimension.End.Column; col++) { // Make all columns just a bit wider. ws.Column(col).Width = ws.Column(col).Width + 1; var cell = ws.Cells[headerRow, col]; // Format the header cells cell.Style.Font.Bold = true; cell.Style.Fill.PatternType = ExcelFillStyle.Solid; cell.Style.Fill.BackgroundColor.SetColor(ColorTranslator.FromHtml("#BFBFBF")); }
??? ??? ??? ???? ??? Excel ??? ??? ?? ?? ??? ? ??? ?? ?? ??
? ??? C#?? ??? ? Excel ?? ??? ??? ???? ??? ??????? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

??? ??











?, ?? ???? C? ??? ??, ?? ??? ? ??????. 1. ?? ???? ??? ??? ?? ?? ??? ?? ?? ??? ?????. 2. ????? ??? ?? ??? ?? ??? ??? ?? ? ??? ?????. 3. ??? ???? ?? ?? ???? ???? ?? ?? ??? ??? ????? ????? ???? ?????.

C? ? ?? ?? ??? ??? ??? : ??? ?? ??? ? ??? ???. 1. ??? ?? ???? ?? ??? ? ???? ?? ????? ?? ??? ????? ?? ???? ??? ? ????. 2. ??? ???? ?? ?? ? ??? ?? ???? ???? ??? ?? ?? ??? ?????.

?, C? ???? ?? ?????. 1) ??? ??? ?? ?? ? ??? ???? ?????. 2) ?? ???? ???? ??? ????. 3) ?? ??? ????? ??? ?? ???? ??? ??? ? ??????. ?? ? ??? ?? ???? ???? ??? ?????? ??? ?? ?????.

C DestructorsCanleadToSeVeralCommonerrors.toaVoidthem : 1) ?? ?? ?? ?? ?? ?? ???

?? ???? ??? C?? ??? ??? ???? ??? : ? ????? ? ? ????? C? ??? ? ????? ?? ?? ??? ?? ??? ???? ?????. 1. ?? ??? ???? C? ?? ??? ???? ?? ?? ?? Curly Braces {}? ???? ?? ??? ?? ??? ???????. 2. ?? ??? ? ??? ?? ???? C?? ?? ??? ?? ????? ??? ???? ???? ???? ??? ?????? ???????. RAII ??? ?? ??? ??? ? ????. 3. ?? ? ??? ???? C? ?? ?, ??? ? ???? ?? ??? ??????? ??? ???? ?? ?? ??? ???????. 4. ?? ????? ???? STL? ??? ????? ????? ????? ???? ????? ????? ???????. 5

C? ???? ??? ??? ? ??? ?? ????? ????. 1. ??? ???? ?? ??? ?? ????? ???? ??? ??? ???? ?? ? ? ????. 2. ??? ?? ???? ?? ??? ? ???? ?? ????, ??? ???? ?????.

C polymorphismincludescompile time, ??? ? Templatepolymorphism.1) compile-timepolymorphismusesfunctionandoveroveroverforlogy

C polymorphismisuniqueduetoitscompikeofile-timeandruntimepolymorphism, forbothefficiency andfoxible.toharnesspowertylogly : 1) audesMartPointerSlikestd :: Quanior_PtrformemoryManagement, 2) ?? baseclasseshavevirtuctors, 3) ??
