国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > .NET > 正文

.Net讀取Excel 返回DataTable實例代碼

2024-07-10 12:44:07
字體:
來源:轉載
供稿:網友

代碼如下:
using System;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using System.Data;
using System.IO;
using System.Linq;
using System.Web;
using System.Collections;
using System.Data.OleDb;
using NuctechProject.DTO.Bll;
using System.Collections.Generic;
namespace NuctechProject.Layouts.Project
{
    public partial class IntroductionPlan : LayoutsPageBase
    {
        string url = Common.rootUrl;
        private string _strConn; //導入excel時的連接
        string pmurl = Common.proUrl;
        private UserBLL bll = new UserBLL();
        protected void Page_Load(object sender, EventArgs e)
        {
            hidProid.Value = Request.QueryString["proid"];
        }
        protected void BtnOK_Click(object sender, EventArgs e)
        {
            DataTable excelTable = null;

            SPSecurity.RunWithElevatedPrivileges(delegate
            {
                if (BaseInfoTemplateFile.HasFile)
                {
                    List<string> noInput = new List<string>();
                    string strLoginName = HttpContext.Current.User.Identity.Name; //獲取用戶名
                    string folderTemp = strLoginName.Substring(strLoginName.LastIndexOf('//') + 1);
                    try
                    {
                        string extension = Path.GetExtension(BaseInfoTemplateFile.FileName); //獲取文件的后綴
                        if (extension != null)
                        {

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 山阳县| 灵石县| 黄山市| 会泽县| 甘南县| 屯门区| 雅江县| 虞城县| 江北区| 铜山县| 屏东县| 洪湖市| 简阳市| 大港区| 枣强县| 将乐县| 巴南区| 顺义区| 西峡县| 云浮市| 江川县| 凤冈县| 平湖市| 蒙城县| 盘锦市| 东乌| 平江县| 错那县| 牡丹江市| 玉门市| 三河市| 崇明县| 抚远县| 仪陇县| 中江县| 安福县| 杂多县| 青阳县| 分宜县| 舒城县| 龙泉市|