相关疑难解决方法(0)

使用switch case语句的问题

我的代码如下.基本上,我正在读取一个excel文件并将其内容存储到一个对象数组中.然后,我使用switch case语句来执行不同的操作.检查下面的代码: -

  using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data;
using System.Drawing;
using System.ComponentModel;
using Excel = Microsoft.Office.Interop.Excel;
using Microsoft.Office.Interop.Excel;
namespace Excel1
{
    class Program
    {
        public static void Main(string[] args)
        //public void ExcelOps()
        {
            //string str;
            Excel.Application xlApp = new Excel.Application();
            Excel.Workbook xlWorkbook = xlApp.Workbooks.Open(@"D:/WebServiceTemplate.xlsx");
            Excel._Worksheet xlWorksheet = xlWorkbook.Sheets[1];
            Excel.Range xlRange = xlWorksheet.UsedRange;
            int rowCount = xlRange.Rows.Count;
            int colCount = xlRange.Columns.Count;
            int numSheets = xlWorkbook.Sheets.Count;
            //
            // Iterate through the sheets. They are indexed …
Run Code Online (Sandbox Code Playgroud)

.net c# console console-application

-9
推荐指数
1
解决办法
1144
查看次数

标签 统计

.net ×1

c# ×1

console ×1

console-application ×1