![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C#
qq_42678477
这个作者很懒,什么都没留下…
展开
-
C#查找Excel()重复项
【代码】C#查找Excel()重复项。原创 2022-08-24 10:58:45 · 439 阅读 · 0 评论 -
快速查找excel两行数据差异
private void button1_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(txtA.Text) || string.IsNullOrEmpty(txtB.Text)) return; rA.Text = GetDiff(GenDict(txtA.Text), GenDict(txtB.Text)); ...原创 2020-09-07 22:01:19 · 392 阅读 · 0 评论 -
openxml追加写入已存在的xlsx文件
private void m2(string fname, string sheetName, DataTable dt, Func<DataTable, DataTable> dealer = null) { if (null != dealer) dt = dealer(dt); //string sheetName = "Data1"; using (...原创 2020-08-06 20:26:02 · 363 阅读 · 0 评论 -
导入数据后汇总分类再回写解决方法(sqlserver/sqlite)
DateTime time1 = DateTime.Now; MyCommon.ExecuteNonQueryBySql(configs[0], "delete from GHJEHZ where 1=1"); string sql = "SELECT gh,max(xm) xm,max(gw) gw,SUM(ysje) ysje,MIN(YJKSJ) yjksj FROM YSKBB GROUP BY GH"; ...原创 2020-08-06 20:22:45 · 258 阅读 · 0 评论 -
c#获取某个目录下前20个较大的文件
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data;using AkImportService;using System.IO;namespace ConsoleApp1{ class Program { ...原创 2020-04-26 10:17:20 · 321 阅读 · 0 评论 -
c#邮件类
using System;using System.Collections.Generic;using System.Linq;using System.Net;using System.Net.Mail;using System.Text;namespace MailTest{ public class AkMail { public AkMai...原创 2020-03-30 07:30:14 · 220 阅读 · 0 评论 -
c#正则提取括号中的字符
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Text.RegularExpressions;namespace ConsoleApp1{ class Program { static void Main(st...原创 2020-03-10 20:39:21 · 753 阅读 · 0 评论 -
C#内存表数据透视表生成
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data;namespace GT{ /// <summary> /// 内存表透视表生成器 2020.3.10 /// 调用方法new PivotTable...原创 2020-03-10 16:11:02 · 493 阅读 · 1 评论 -
openxml输出excel文件带格式样式
private void btnTest_Click(object sender, EventArgs e) { ((Button)sender).Enabled = false; string dir = MyCommon.GetDeskTopTimeDir(); string filename = A...原创 2020-02-11 07:15:36 · 595 阅读 · 1 评论 -
openxml创建excel文件
// WorkbookPart -> Workbook // (上面 (wbPart.AddNewPart<WorksheetPart>) )WorksheetPart -> Worksheet -> SheetData //Sheets Sheet WorksheetPart Worksh...原创 2020-02-09 10:34:04 · 402 阅读 · 0 评论 -
sqlserver 字段长度大于数据库表字段或者内存表与数据库表字段不匹配提示
DataTable dtCompare = new DataTable(); dtCompare.Columns.Add("FieldName", typeof(string)); dtCompare.Columns.Add("FieldType", typeof(string)); ...原创 2020-02-01 15:51:04 · 1197 阅读 · 0 评论 -
wpf选择文件
private void btnOpenXlsx_Click(object sender, RoutedEventArgs e) { var openFileDialog = new Microsoft.Win32.OpenFileDialog() { Filter = "Excel ...原创 2020-01-31 05:59:40 · 248 阅读 · 0 评论 -
wpf单例及带参数调用
using System;using System.Collections.Generic;using System.Configuration;using System.Data;using System.Diagnostics;using System.Linq;using System.Windows;namespace FM{ /// <summary&g...原创 2020-01-31 05:55:37 · 542 阅读 · 0 评论 -
OpenXML方式输出到Excel(考虑超百万)
/// <summary> /// 输出到单个Excel文件,考虑超100万的数据 2019.12.24 /// </summary> /// <param name="config"></param> /// <param name="xlsxFilename"...原创 2019-12-24 15:15:05 · 905 阅读 · 1 评论 -
wpf播放器
原文:https://www.cnblogs.com/tianma3798/p/5928217.htmlusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows;using S...原创 2019-12-23 10:07:54 · 151 阅读 · 0 评论 -
OpenXml之SpreadSheetML学习
需要引用windowsbaseusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using DocumentFormat.OpenXml;using DocumentFormat.OpenXml.Packa...原创 2019-12-22 17:05:24 · 293 阅读 · 0 评论 -
c#以不同方式显示表
disp2 "**|**|**"disp1 关键列(MC)结果:将拆分后的DISP2作为关键列,DISP1组合起来显示先记录草稿,需要进一步优化 DataTable dt = new CombindSearch(prj.Bl.GetConStr(), "XMLB", "mc", "sflp", "项目名称", "是否录屏").GetNewDt();...原创 2019-10-17 10:47:15 · 168 阅读 · 0 评论 -
c#在容器中动态创建按钮并绑定事件
private void Form1_Load(object sender, EventArgs e) { string configPath = @"E:\新建文件夹\ImportConfig.xml"; config = new ImportConfig(configPath); for...原创 2019-10-12 07:47:57 · 598 阅读 · 0 评论 -
c#四舍五入
decimal jfzl = Math.Round(Convert.ToDecimal(dr["JFZL"]), 0, MidpointRounding.AwayFromZero); dr["XJFZL"] = jfzl;原创 2019-10-10 20:59:00 · 108 阅读 · 0 评论 -
C#生成指定位数包含字母与数字随机密码
public static string GetPassword(int length) { string code = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; Random rand = new Random(); ...原创 2019-08-02 09:26:23 · 439 阅读 · 0 评论