C# NPOI operation Excel summary

There are many ways to operate Excel with C#, such as the OleDb method to read and write Excel through the database, but the OleDb method needs to install Microsoft Office, and you can also operate Excel through COM components, which also need to install Microsoft Excel. If you don’t want to install Microsoft Office […]

C# NPOI create Excel

C# NPOI create Excel NPOI is an open source tool that provides C# operations to import or export Excel .NET version: .NET 5 NPOI version: 2.6.0 Basic usage ideas Create a workbook (Workbook) Create a worksheet (WorkSheet) in the workbook (Workbook) Create a row (Row) in the worksheet (WorkSheet) Create a cell (Cell) in a […]

Java custom annotations, and usages such as @interface @Target @Retention @Around @Before @After ProceedingJoinPoint JoinPoint

Annotations are widely used, and our custom annotations can simplify the development of various businesses 1. Keyword explanation (1) When defining annotations, keywords @interface to indicate the type of the annotation class Keyword Is it required? Description @Target Yes Yes Target aspect, the declaration scope is in fields, methods, classes, etc., ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, etc. […]

General export of excel based on DotNetCoreNPOI encapsulation feature

Generally export excel based on DotNetCoreNPOI encapsulation feature Currently, according to the requirements of the project, it supports column name definition, column index sorting, row merging cells, and the format of EXCEL cells It is also adjusted according to the type of data. Renderings: Documentation Update time content 2023-04-18 First edition 2023-04-21 1. Add reflection […]

pinpoint2.3.3 monitoring alarm information Feishu push

Directory 1. Relevant instructions 2. Deploy pinpoint2.3.3 3. Deploy monitoring and alarm information Feishu push 3.1 Update the alarm_rule table of pinpoint MYSQL 3.2 deploy slack-receiver 3.3 pinpoint-web, pinpoint-batch configuration 3.4 Alarm message push configuration 1. Related instructions 1.1 Slack-receiver: GitHub – doll6777/slack-receiver 1.2 Instructions for Feishu’s custom robot (using the sending message card): Development […]

C# uses NPOI to set the saved table style

Usually we directly implement the saving function through NPOI without setting any styles, so usually the layout is very common, without font settings, color settings, cell settings, etc. Make the saved form display very ordinary. No visual impact. Nor can we highlight the information we want to prompt. As shown in the figure below, we […]

C# uses NPOI to simply import and export excel and obtain the method of externally importing excel

C# uses NPOI to simply import and export excel and obtain the method of importing excel from outside Introduce NPOI import export Formula type Introducing NPOI To use npoi, it must be introduced: Method 1, using the import method that comes with vstudio, Click Project –> Manage NuGet Packages –> Search for the corresponding NPOI […]

Using NPOI to import complex excel tables

An excel sheet contains the data of 4 tables, namely the Area table, the PlantUnit table, the Device equipment table, and the Spares spare parts table Their relationships are respectively: the region table contains units, units contain equipment, equipment contains spare parts, and the relationship is cascaded in sequence. First use NPOI to parse excel […]

NPOI export template and import set a column read-only and create data validation objects (set data validation rules)

#region Downloading the score comparison data template /// <summary> /// Download the score comparison value data template /// </summary> public void DownScoreTemplateMethod() {<!– –> string sqlStr = @” SELECT q.q_code AS index code, d.q_name || q.q_name AS indicator name, ” AS name, ” AS constant value, ” AS whether to operate, ” AS operation value, […]

C# uses NPOI to realize EXCEL export without installing Office

Environment VS2019 + NPOI 2.6.0 Import NPOI package NPOI.XSSF => Excel 2007 (xlsx) format read and write library Realize data grouping and export data, pass in parameters and data into DataTable according to needs private void OriDataToExcel(List<SelectData> dataList) {<!– –> if (dataList == null || dataList. Count <= 0) {<!– –> MessageBox.Show(“Select at least one […]