The following forum(s) are migrating to a new home on Microsoft Q&A (Preview): Developing Universal Windows apps!

Ask new questions on Microsoft Q&A (Preview).
Interact with existing posts until December 13, 2019, after which content will be closed to all new and existing posts.

Learn More

 none
How to open Word, Excel, Powerpoint in UWP ? RRS feed

  • Question

  • As I can open Word, Excel, PowerPoint in Uwp C# since I have seen that WPF has the DocumentViewer tag.

    Which would be the label for UWp?

    Wednesday, June 12, 2019 1:26 PM

All replies

  • Hi,

    Well, currently there is no such APIs in UWP apps like WPF. But you could launch the default app associated with the file type in UWP apps using Launcher.LaunchFileAsync Method. For example, launch Word2016 for a .docx file from UWP apps. 

    It looks like this:

    var file = await ApplicationData.Current.LocalFolder.GetFileAsync("May.docx");
    
        if (file != null)
        {
            // Launch the retrieved file
            await Windows.System.Launcher.LaunchFileAsync(file);
        }

    For more information about this, please refer this:Launch the default app for a file.

    If you don't want to use that, you might need to search on the internet for a third party library about this.

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, June 13, 2019 1:41 AM
    Moderator
  • Hi:

    Then there is a XAML tag for the docx etc to exit. And if third which I can use.

    Thursday, June 13, 2019 6:10 AM
  • Hi,

    >>Then there is a XAML tag for the docx etc to exit.

    I could not understand it well. Could you give me some more detailed information? 

    >>And if third which I can use.

    You could open your favorite search engine and search about how to open official docs in UWP and look if there will have a third party library to do that.

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, June 13, 2019 9:08 AM
    Moderator
  • Hi:

     I want to do is convert a Word document, Excel, PowerPoint to PDF. The question is whether there is a XAML control in UWP that displays the Word file, Excel, PowerPoint.

    Thursday, June 13, 2019 1:02 PM
  • Hi,

    No, currently there is no native UWP xaml controls could open office files. If you really need this, you could try to add a feature request here:User Voice.

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, June 14, 2019 2:26 AM
    Moderator
  • hi:

    You could make a list of the files you want to convert to PDF

    Friday, June 14, 2019 6:51 AM
  • Hi,

    Yes, if you want, you could list all the files you want to show in xaml in UWP apps in the User Voice. Also the same with all the files you want to convert to PDF, you could submit a feature request in the User Voice.

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, June 17, 2019 2:45 AM
    Moderator