View excel in WPF application

I’m trying to view Excel files inside my WPF .NET application.

To achieve this I tried to host the Aspose.Cells Grid Controls inside my application using the WindowsFormsHost control.

Question 1:

I can’t find the Aspose.Cells.GridDesktop.dll neither in the Nuget package nor in the downloaded package. Where is it?

We own an Aspose.Cell license.

Question 2:

Is this even the right approach to view excel in an WPF application? Any other solutions?

Kind regards

Dirk




.
Hi,

Thanks for your query.

1) Well, you may download the complete Aspose.Cells for .NET package (MSI installer or zipped archive) from the Downloads section to get latest Aspose.Cells.GridDesktop and Aspose.Cells.GridWeb controls here:
http://www.aspose.com/downloads/cells/net

2) I am afraid, the feature (Support for Aspose.Cells.GridDesktop in WPF) is not available at the moment. However, we have already logged a feature request in this regard under the ticket CELLSNET-41264. The issue is in progress but I am afraid, it is difficult to support the control in WPF application because we need to add WPF run-time support and change events to render part code based on WPF framework. I am afraid, we don't have plan to do it any time soon.

Thank you.

I was able to view an excel document using Aspose.Cells GridDesktop in my WPF application like that:

<Window x:Class=“MvvmLight1.MainWindow”
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ignore="http://www.galasoft.ch/ignore"
xmlns:wf=“clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms”
xmlns:gridDesktop=“clr-namespace:Aspose.Cells.GridDesktop;assembly=Aspose.Cells.GridDesktop”>




<WindowsFormsHost.Child>
<gridDesktop:GridDesktop x:Name=“asp” />
</WindowsFormsHost.Child>





So indeed you can view an Excel in a WPF application.

Hi Dirk,


Thank you for sharing the workaround.

I have been able to use the Aspose.Cells’ GridDesktop in a WPF application as per your suggestions. Attached to this post is a sample application along with latest revision of Aspose.Cells.GridDesktop.dll for reference.

The issues you have found earlier (filed as CELLSNET-41264) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Here for reference a direct link to the documentation

Hi,


Yes, you are right, you may browse the document for your reference:
http://www.aspose.com/docs/display/cellsnet/Using+Aspose.Cells.GridDesktop+in+WPF+Application

Thank you.