111,097
社区成员




using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Office.Interop.Excel;
using System.Collections;
using System.Reflection;
class Program
{
static void Main(string[] args)
{
Application app = new Application();
Workbook wb = app.Workbooks.Add("d:\\xls.xls");
Sheets sheets = app.Worksheets;
_Worksheet sheet = (_Worksheet)sheets[1];
int rowIndex = 3, colIndex = 3;
Range cell = (Range)sheet.Cells[rowIndex + 1, colIndex + 1];
cell.Value = "XXX";
wb.Save();
Console.Write("已保存至:{0}\n\n按任意键退出...", wb.FullName);
app.Quit();
Console.ReadKey(true);
}
}