Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

Problem to refer to Excel

$
0
0

Hi,
How to correct this

Error 1 Invalid token '=' in class, struct, or interface member declaration C:\Proj\Form2\Form2\Class1.cs 14 15 Form2

due to the last line below?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Excel=Microsoft.Office.Interop.Excel; 

namespace Form2
{
    public class Class1
    {
        private static Excel.Workbook MyBook = null; 
        private static Excel.Application MyApp = null;
        private static Excel.Worksheet MySheet = null;
        MyApp = new Excel.Application();
        ...


Many Thanks & Best Regards, Hua Min


Viewing all articles
Browse latest Browse all 31927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>