</pre><pre name="code" class="csharp">using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Reflection;
using Excel = Microsoft.Office.Interop.Excel;
namespace DelExcel
{
public partial class Form1 : Form
{
private Excel._Application excelApp = null;
private Excel.Workbook book = null;
private Excel.Worksheet sheet = null;
private Excel.Range range = null;
string filePath = @"E:\2010.xls";
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
delExcel(filePath);
}
private void delExcel(string filePath)
{
excelApp = new Microsoft.Office.Inter
【C#】C#删除Excel整行,更新单元格内容
最新推荐文章于 2025-05-29 15:00:44 发布