(一)具体教程查看:011——C#创建ECXEL文件(附教程)

(二)代码:foldPath 就是获取到的文件路径

private void button1_Click(object sender, EventArgs e)
{

                       FolderBrowserDialog dialog = new FolderBrowserDialog();
dialog.Description = "请选择文件路径";
string foldPath = "";
if (dialog.ShowDialog() == DialogResult.OK)
{
foldPath = dialog.SelectedPath + @"\";
}
textBox1.Text = foldPath;
}

010——C#选择文件路径的更多相关文章

  1. windows API实现用户选择文件路径的对话框

    在编写应用程序时,有时需要用户选择某个文件,以供应用程序使用,比如在某些管理程序中需要打开某一个进程,这个时候需要弹出一个对话框来将文件路径以树形图的形式表示出来,以图形化的方式供用户选择文件路径,而 ...

  2. Qt选择文件路径

    QString file_path = QFileDialog::getExistingDirectory(this, "请选择文件路径...", "./"); ...

  3. C# 选择文件路径,选择文件

    // 选择文件: private string SelectPath() { string path = string.Empty; var openFileDialog = new Microsof ...

  4. Winform选择目录路径与选择文件路径

    https://blog.csdn.net/zaocha321/article/details/52528279 using System.Collections.Generic; using Sys ...

  5. c#winform选择文件,文件夹,打开指定目录方法

    private void btnFile_Click(object sender, EventArgs e) { OpenFileDialog fileDialog = new OpenFileDia ...

  6. 使用C#选择文件夹、打开文件夹、选择文件

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...

  7. C#选择文件、选择文件夹、打开文件

    1.选择文件用OpenDialog OpenFileDialog dialog = new OpenFileDialog(); dialog.Multiselect = true;//该值确定是否可以 ...

  8. C# winform 选择文件保存路径

    1.winform 点击按钮选择文件保存的路径,效果如下图: 具体代码如下: private void button8_Click(object sender, EventArgs e) { Fold ...

  9. C# winform文件批量转编码 选择文件夹

    C# winform文件批量转编码 选择文件夹 打开指定目录 private void btnFile_Click(object sender, EventArgs e) { OpenFileDial ...

随机推荐

  1. RS232标准与TTL/COM小常识

    1.TTL电平标准 输出 L: <0.8V : H:>2.4V. 输入 L: <1.2V : H:>2.0V 2.CMOS电平标准 输出 L: <0.1*Vcc : H: ...

  2. 爬虫探索Chromedriver+Selenium初试

    今天分享Python使用Chromedriver+Selenium爬虫的的方法,Chromedriver是一个有意思的爬虫插件,这个插件的爬虫方式主要是完全模拟浏览器点击页面,一步一步去找你要的东西, ...

  3. WUSTOJ 1317: cms的苦恼(Java)快速幂

    题目链接:

  4. go io.Reader 接口

    io 包指定了 io.Reader 接口, 它表示从数据流结尾读取. Go 标准库包含了这个接口的许多实现, 包括文件.网络连接.压缩.加密等等. io.Reader 接口有一个 Read 方法: f ...

  5. 1. Spark基础解析

    1.1 Spark概述 1.1.1 什么是Spark 官网:http://spark.apache.org Spark是一种快速.通用.可扩展的大数据分析引擎,2009年诞生于加州大学伯克利分校AMP ...

  6. rabbitMQ 重试

    rabbitMQ 重试机制 spring.rabbitmq.listener.simple.retry.max-attempts=5 最大重试次数spring.rabbitmq.listener.si ...

  7. 前端require代码抽离小技巧

    DEMO 文件目录结构 plugin.js // /CommonJS规范 // var exports = module.exports; exports.test = function () { c ...

  8. flutter从入门到精通一

    Flutter 是 Google 开源的 UI 工具包,帮助开发者通过一套代码库高效构建多平台精美应用,支持移动.Web.桌面和嵌入式平台 flutter是基于dart语言开发的,我们将首先通过几章节 ...

  9. linux 系统运维工具13款

    1. 查看进程占用带宽情况 - Nethogs Nethogs 是一个终端下的网络流量监控工具可以直观的显示每个进程占用的带宽. 下载:http://sourceforge.net/projects/ ...

  10. vue 做的tabBar组件

    效果如下 调用 <tabbar :selected='selected'></tabbar> 组件 <template> <div class='tabbar ...