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
close icon

How to use SpreadsheetControl only as an XLS viewer

Hi,

I'd like to use SpreadSheetControl only as a viewer of an Excel fle.

So I'd like to be able, by code or by XAML binding, to dinamically set the current filename to display.
Secondly, I'd like the user can navigate all over the EXCEL loaded document but he is not able to change anything in the document.

Is it possible to obtain such a requisite with this control ?

Slivio

1 Reply

GA Gayathri Arumugam Syncfusion Team March 20, 2017 04:48 PM UTC

Hi Silvio, 
 
Sorry for the inconvenience.     
 
SfSpreadsheet is an alternate for Spreadsheet control which provides better performance and rich set features over Spreadsheet control. Since we have marked it as a classic control, we wouldn’t make any further enhancements in this control. So we highly recommend you to use the alternate control SfSpreadsheet to have better performance and stability. 
 For  more reference please refer the below links. 
 
Dashboard sample: Syncfusion Control Panel -> WPF -> GRIDS  -> Spreadsheet -> GETTING STARTED -> Getting Started 
 
 
                               https://help.syncfusion.com/uwp/sfspreadsheet/worksheet-management#protection  
 
but still for your reference we have prepared a code snippet to protect workbook in SpreadsheetControl(Classic). 
 
C#: 
 
        void spreadSheetControl_WorkBookLoaded(object sender, Syncfusion.Windows.Controls.Spreadsheet.WorkbookLoadedEventArgs args) 
        { 
            foreach (var sheet in args.Workbook.Worksheets) 
                (sheet as IWorksheet).Protect(""); 
            foreach (var grid in args.GridCollection) 
            { 
                grid.QueryCellInfo += grid_QueryCellInfo; 
                grid.InvalidateCells(); 
            } 
 
        } 
 
        void grid_QueryCellInfo(object sender, Syncfusion.Windows.Controls.Grid.GridQueryCellInfoEventArgs e) 
        { 
            e.Style.ReadOnly = true; 
        } 
 
Please let us know if you have any queries about this.  
 
 
Regards, 
Gayathri 


Loader.
Live Chat Icon For mobile
Up arrow icon