if (listView1.Items.Count > 0)
{
MyRange = MyWorkSheet.get_Range("A2", Missing.Value);
object[,] MyData = new Object[listView1.Items.Count, listView1.Columns.Count];
for (int j = 0; j < listView1.Items.Count; j++)
{
ListViewItem lvi = listView.Items[j];
for (int k = 0; k < listView1.Columns.Count; k++)
{
MyData[j, k] = lvi.SubItems[k].Text;
}
}
MyRange = MyRange.get_Resize(listView1.Items.Count, listView1.Columns.Count);
MyRange.Value2 = MyData;
MyRange.EntireColumn.AutoF