Перевести на C#
Кто поможет перевести код на C# ?
optionstrictoff
imports System
imports System.Reflection
imports System.Runtime.InteropServices
Imports Microsoft.Office.Interop.Excel
........
Dim app As Application
app = New Application()
Dim myBook As Workbook
myBook = app.Workbooks.Open("Книга1.xls") 'Открываем книгу
Dim mySheet As Worksheet
mySheet = myBook.Sheets.Item("Лист1") 'выбираем лист
Dim myCell AsObject
myCell = mySheet.Range("A1", "B1") 'диапазон теперь
using System.Reflection;
using System.Runtime.InteropServices;
using Microsoft.Office.Interop.Excel;
........
Application app;
app = new Application();
Workbook myBook;
myBook = app.Workbooks.Open("Книга1.xls"); //Открываем книгу
Worksheet mySheet;
mySheet = myBook.Sheets.Item("Лист1"); //выбираем лист
object myCell;
myCell = mySheet.Range("A1", "B1"); //диапазон теперь
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Reflection;
using System.Runtime.InteropServices;
using Microsoft.Office.Interop.Excel;
namespace WindowsApplication1
{
class XL
{
public Application app;
public Workbook myBook;
public Worksheet mySheet;
public object myCeel;
}
[STAThread]
static void Main()
{
app = new Application();
myBook = app.Workbooks.Open("Книга1.xls");
mySheet = myBook.Sheets.Item("Лист1");
myCell = mySheet.Range("A1", "B1");
}
}
}