- 博客(7)
- 收藏
- 关注
原创 使用OpenXml将Datagridview导出到excel
FontCharSet = new FontCharSet() { Val = 0 } // 字符集。FontCharSet = new FontCharSet() { Val = 0 } // 字符集。FontCharSet = new FontCharSet() { Val = 0 } // 字符集。// NumberFormatId = 0 // 明确指定NumberFormatId。// NumberFormatId = 0 // 明确指定NumberFormatId。
2024-10-24 13:05:04
1463
原创 c# Winform 检查XML档的完整性
/ 如果解析过程中出现异常,可能意味着XML文件损坏或有乱码。// 所有节点检查通过。// 检查 节点是否存在。// 处理其他异常情况。
2024-09-23 15:26:02
532
原创 c# winform 以excel形式导出表格中的数据
/ 假设我们只操作第一个工作表。// 文件不存在,创建一个新的Excel文件并写入信息。// 文件存在,打开并写入或覆盖信息。// 设置EPPlus的许可证上下文。// 清除工作表内容。// 检查文件是否存在。
2024-09-23 15:18:34
870
原创 使用c# 往.TXT档中写值
string headerText = "日期" + " " + "警报编号" + " " + "警报文本" + " " + "发生时间" + " " + "确认时间";// 这里使用FileMode.Create会覆盖文件内容,如果要追加请使用FileMode.Append。
2024-09-03 16:15:36
682
原创 c#读取.txt文档中的值
MessageBox.Show("Alarm.txt文档不存在Alarm" + "" + alarmno + "警报信息!MessageBox.Show(rdfilePath + " 不存在", "Alarm", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);MessageBox.Show("Alarm文档错误", "Alarm", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
2024-09-03 16:11:19
1599
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人