博文

目前显示的是 九月, 2018的博文

log ClosedXML

Microsoft Visual Studio 1. NuGet Package Manager installs ClosedXML that depends DocumentFormat.OpenXml, ExcelNumberFormat, and WindowsBase. 2.using ClosedXML.Excel; using System; using System.Data; using System.Data.OleDb; using System.IO; 3. read .xlsx file using (var workbook = new XLWorkbook(xlsxfile)) { ...   var ws = workbook.Worksheet(1);   foreach (var row in ws.Rows())   {if (!row.IsEmpty()){string cell1 = row.Cell(1).GetValue<string>();                                      object value =row.Cell(1).Value; }   } } 4. OpenFileDialog             using (OpenFileDialog openFileDialog = new OpenFileDialog())             {       ...

javascript Alert and url query

<!DOCTYPE html> <html> <head> <style> .alert {     padding: 20px;     background-color: #f44336;     color: white; } .closebtn {     margin-left: 15px;     color: white;     font-weight: bold;     float: right;     font-size: 22px;     line-height: 20px;     cursor: pointer;     transition: 0.3s; } .closebtn:hover {     color: black; } </style> </head> <body> <h2>Alert Messages</h2> <p>Click on the "x" symbol to close the alert message.</p> <div class="alert">   <span class="closebtn" onclick="this.parentElement.style.display='none';">&times;</span>   <strong>Danger!</strong> Indicates a dangerous or potentially negative action. </div> </body> </html...