c#的datagridview写入数据_excel导入arcmap属性表

c#的datagridview写入数据_excel导入arcmap属性表将gridview导出Excel表方法#region导出Excel表方法///<summary>///导出Excel表方法///</summary>///<paramname="gridview">当前gridview表</param>publicstaticvoidExportExcelMethod(DevExpress.XtraGrid.Grid

将gridview导出Excel表方法

 #region 导出Excel表方法
        /// <summary>
        /// 导出Excel表方法
        /// </summary>
        /// <param name="gridview">当前gridview表</param>
        public static void ExportExcelMethod(DevExpress.XtraGrid.GridControl gridview)
        { 
   
            SaveFileDialog sf = new SaveFileDialog();
            sf.RestoreDirectory = true;
            sf.Filter = " Excel files(*.xls)|*.xls|All files(*.*)|*.*";
            if (sf.ShowDialog() == DialogResult.OK)
            { 
   
                string localFilePath = sf.FileName.ToString();//获得文件路径 
                gridview.ExportToXls(localFilePath);
            }
        }
只听到从架构师办公室传来架构君的声音:
绣被掩余寒,画幕明新晓。有谁来对上联或下联?
架构君码字不易,如需转载,请注明出处:https://javajgs.com/archives/209154
0
   

发表评论