This is a migrated thread and some comments may be shown as answers.

Excel "viewer-only" functionality

1 Answer 583 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 12 Nov 2018, 09:29 AM

Hi support team

Our customer wants to display the content of a simple (i.e. one sheet, simple content, see sample image attached) excel on a ASP.NET MVC rendered page. Is there a way to configure the Spreadsheet component without any menues and additional functionality like editing, copy/paste, etc.? 

Or is there a smarter way to provide such "viewer-only" functionality, like loading the excel sheet and display its contet in a Grid component? 

Uploading the file is not an issue, we have implemented this already. My question is only about rendering/displaying the content of a excel sheet on a page.

Any advice is highly appreciated. 

Regards, Daniel 

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 12 Nov 2018, 04:34 PM
Hello Daniel,

The following article shows one way to achieve something similar. It is written for the WebForms wrapper of the spreadsheet widget, but the JavaScript approach is the same, the rest is irrelevant. Link: https://www.telerik.com/support/kb/aspnet-ajax/spreadsheet/details/load-excel-file-into-a-read-only-spreadsheet. Here's the extract:

spreadsheetReference.one("render", function (e) {
            e.sender.sheets().forEach(function (sheet) {
                sheet.range(0, 0, sheet._rows._count, sheet._columns._count).enable(false);
            })
        })

The goal of the spreadsheet widget is to allow editing, however, and if only display is the goal, perhaps parsing the file with a tool like RadSpreadProcessing on the server will let you generate a data source for a grid that will not require any editing. Alternatively, getting the JSON through the Telerik.Web.Spreadsheet.Workbook class may be another approach you can take to get a grid data source out of a spreadsheet.


Regards,
Marin Bratanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Spreadsheet
Asked by
Daniel
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or