C#下对Excel的基本操作
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Office.Interop.Excel;
namespace ConsoleTest1
{
class Program
{
static void Main(string[] args)
{
Application excel = new Application();
excel.Visible = true;
excel.Workbooks.Add(Type.Missing);
for (Int32 i = 1; i < 5; i++)
{
for (Int32 j = 1; j < 5; j++)
{
excel.Cells[i, j].Value = "(" + i.ToString() + "," + j.ToString() + ")";
}
}
}
}
}

浙公网安备 33010602011771号