We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

When open .xlsx file, chart is not visible in SfSpreadsheet


I'm just testing Syncfusion SfSpreadsheet in WPF.

I wrote a simple program to open Excel 2016 file. In my Excel file there are only one sheet for date and one chart (column chart).

After workbook open, in my application the data sheet is well created and data are visible.

There is tab created for chart but the chart is not displayed.

The xaml code:

        xmlns:Syncfusion="http://schemas.syncfusion.com/wpf" x:Class="MainWindow"
        Title="MainWindow" Height="350" Width="525">
            <RowDefinition Height="Auto"/>
        <Syncfusion:SfSpreadsheet x:Name="LaGrille" Grid.Row="0"/>
        <Button Content="Test" Grid.Row="1" Click="Button_Click"/>

The VB code:

Class MainWindow
    Public Sub New()

        ' Cet appel est requis par le concepteur.

        ' Ajoutez une initialisation quelconque après l'appel InitializeComponent().

    End Sub
    Private Sub Button_Click(sender As Object, e As RoutedEventArgs)
        LaGrille.Open("C:\Users\patri\Documents\Test graph.xlsx")
    End Sub
End Class

I have the same result with one .xls file.

What's wrong ? My code ? SfSpreadsheet is not able to display chart in WPF ?

Thanks for your support.

Attachment: Test_graph_2530c2d4.7z

3 Replies

KB Kanimozhi Bharathi Syncfusion Team January 9, 2017 11:08 AM UTC

Hi Patrice Thominot, 
For importing charts in SfSpreadsheet,  you need to add “Syncfusion.SfSpreadsheetHelper.WPF.dll “assembly as reference into the application. Create an instance of Syncfusion.UI.Xaml.SpreadsheetHelper.GraphicChartCellRenderer and add that renderer into GraphicCellRenderers collection by using the helper method AddGraphicChartCellRenderer which is available under the namespace Syncfusion.UI.Xaml.Spreadsheet.GraphicCells. 
Please refer the below UG link for your reference, 
We have also prepared a sample for your reference, please find the sample link below, 
Kanimozhi B 

PT Patrice THOMINOT January 9, 2017 08:22 PM UTC


Thanks a lot, all is OK now


KB Kanimozhi Bharathi Syncfusion Team January 10, 2017 09:45 AM UTC

Hi Patrice Thominot, 
Thank you for your update. 
Kanimozhi B 

Live Chat Icon For mobile
Up arrow icon