none
Open exel file in WPF RRS feed

  • Question

  • Hi, i am beginner in programming, but i'm want to learn, can you help me how can i make app that implements exel file in WPF? Thank you in advance.
    Saturday, March 12, 2016 3:29 PM

Answers

  • Milan1995,

    Sorry but this forum is dedicated to questions/issues about customizing and programming Microsoft Project, a project management application. I suggest you try either an WPF forum

    https://msdn.microsoft.com/en-us/library/aa970268%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396

    or an Excel forum

    https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=exceldev

    John

    Saturday, March 12, 2016 8:00 PM

All replies

  • Milan1995,

    Sorry but this forum is dedicated to questions/issues about customizing and programming Microsoft Project, a project management application. I suggest you try either an WPF forum

    https://msdn.microsoft.com/en-us/library/aa970268%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396

    or an Excel forum

    https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=exceldev

    John

    Saturday, March 12, 2016 8:00 PM
  • Hi Milan,

    Here is a solution you can use to open excel file in WPF, check:

    using System.Windows;
    using Spire.Xls;
    
    namespace Open_Excel
    {
        public partial class MainWindow : Window
        {
            public MainWindow()
            {
                InitializeComponent();
            }
    
            private void button1_Click(object sender, RoutedEventArgs e)
            {
                Workbook workbook = new Workbook();
                workbook.LoadFromFile("FileName");
                System.Diagnostics.Process.Start("FileName");
            }
        }
    }
    

    This solution is provided by a free .net excel library.

    How to apply these code?

    • Download and install the lib.
    • Create a WPF applications project, right-click the project name, select add reference to add the dll file from the lib installation folder to your project as reference.
    • Now you can use the code snippet above to open excel file.

    Monday, March 14, 2016 6:59 AM