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 Excel = Microsoft.Office.Interop.Excel;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
Excel.
Application meme =
new Excel.
ApplicationClass();
///you've to do something to this line
Excel.Range koko = meme.get_Range("Numbers",Type.Missing);
koko.Sort(koko.Columns[1, Type.Missing], Excel.XlSortOrder.xlAscending,
koko.Columns[2, Type.Missing], Type.Missing,
Excel.XlSortOrder.xlAscending, Type.Missing,
Excel.XlSortOrder.xlAscending, Excel.XlYesNoGuess.xlNo,
Type.Missing, Type.Missing, Excel.XlSortOrientation.xlSortColumns,
Excel.XlSortMethod.xlPinYin, Excel.XlSortDataOption.xlSortNormal,
Excel.XlSortDataOption.xlSortNormal,
Excel.XlSortDataOption.xlSortNormal);
}
}
}