Embed an excel document in an intranet browser and go to sheet

This will make my user much easier if I can do the following:

  • Allow viewing Excel document (not editable) in Internet Explorer 8

  • Facilitate the transition to specific sheets in this document.

I can insert an Excel file using an iframe that works, but I'm completely stuck when it comes to switching to a specific name sheet in this document.

Is it possible? I think there is some way to get the document to first display a specific worksheet, via the src attribute, or to control the embedded document through javascript.

+4
source share
4 answers

If you use XMLSS, you can specify ActiveSheet, ActiveRow, and ActiveCol. If you use a third-party control, they usually have a way to set the active sheet and range. If you use an HTML table or cvs, you're out of luck.

<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel"> <ActiveSheet>1</ActiveSheet> </ExcelWorkbook> <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel"> <Selected/> <Panes> <Pane> <Number>3</Number> <ActiveRow>16</ActiveRow> <ActiveCol>5</ActiveCol> </Pane> </Panes> </WorksheetOptions> 
+1
source

Have you tried the PHP excel reader? I used it for similar purposes once. http://sourceforge.net/projects/phpexcelreader/

+1
source

I'm not sure if you can do this using JavaScript. But another question. Are you creating this file on the server side? You can then embed a macro that moves to this partial worksheet.

0
source

The thought of something. Use AJAX, send back when the HTML element changes, reload the workbook with the modified open workbook macro, which uses writeback data to display the correct worksheet and range. Since there is no browser update flash, the user may / will never notice. The only drawback is returning back to the server there.

0
source

Source: https://habr.com/ru/post/1301024/


All Articles