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.
Unfortunately, activation email could not send to your email. Please try again.

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

Thread ID:

Created:

Updated:

Platform:

Replies:

128210 Jan 8,2017 04:41 PM Jan 10,2017 04:45 AM WPF 3
loading
Tags: SfSpreadsheet
Patrice THOMINOT
Asked On January 8, 2017 04:41 PM

Hi

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:

<Window
        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:local="clr-namespace:WpfApp1"
        xmlns:Syncfusion="http://schemas.syncfusion.com/wpf" x:Class="MainWindow"
        mc:Ignorable="d"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Syncfusion:SfSpreadsheet x:Name="LaGrille" Grid.Row="0"/>
        <Button Content="Test" Grid.Row="1" Click="Button_Click"/>
    </Grid>
</Window>


The VB code:

Class MainWindow
    Public Sub New()

        ' Cet appel est requis par le concepteur.
        InitializeComponent()

        ' 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

Kanimozhi Bharathi [Syncfusion]
Replied On January 9, 2017 06:08 AM

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, 
 
 
Regards 
Kanimozhi B 


Patrice THOMINOT
Replied On January 9, 2017 03:22 PM

Hi

Thanks a lot, all is OK now

Regards

Kanimozhi Bharathi [Syncfusion]
Replied On January 10, 2017 04:45 AM

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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;