0

So basically I am creating a application to where I want to insert an excel sheet inside of the folder path provided.

Here is my Code:

private void BSave_Click(object sender, EventArgs e)
    {

        FolderBrowserDialog ofd = new FolderBrowserDialog();

        if (ofd.ShowDialog() == DialogResult.OK)
        {
            TextOutputFile.Text = ofd.SelectedPath;
        }
    }
  • Are you asking how to copy a existing Excel file from a folder to another folder or how to create an Excel file in the folder selected? – Steve May 15 '19 at 15:11
  • How to create an Excel file in the folder selected –  May 15 '19 at 15:12
  • You need to use [Office Interop](https://stackoverflow.com/questions/10477977/what-reference-do-i-need-to-use-microsoft-office-interop-excel-in-net) or a specialized Excel library. A good one is [EPPlus](https://github.com/JanKallman/EPPlus) – Steve May 15 '19 at 15:15
  • Would you be able to provide more insight on how this might be applied to the code provide above,I already have the path where the Folder is provided now I need to add the excel file to that folder –  May 15 '19 at 15:19
  • SO has a lot of examples https://stackoverflow.com/questions/151005/how-to-create-excel-xls-and-xlsx-file-in-c-sharp-without-installing-ms-offic – Steve May 15 '19 at 15:21

0 Answers0