Forum

Notifications
Clear all

How to hide viewer bar in my file ?

6 Posts
4 Users
0 Reactions
209 Views
(@christine-haumonthotmail-com)
Posts: 2
New Member
Topic starter
 

Hello,

Could you please help me to hide the viewbar in my excel file Capture.PNG?

I use Excel 2019 on Windows 10

 
Posted : 08/09/2020 10:20 am
(@purfleet)
Posts: 412
Reputable Member
 

Not sure why you would want to in a worksheet but......

Sub scrollbars()

ActiveWindow.DisplayHorizontalScrollBar = False
ActiveWindow.DisplayVerticalScrollBar = False

End Sub

 
Posted : 08/09/2020 2:17 pm
(@mynda)
Posts: 4761
Member Admin
 

Hi Christine,

Purfleet's instructions are for hiding the scroll bars in Excel for the desktop using VBA. I think based on your screenshot that you mean the viewer bar when embedding your file in a web page using the Excel Web App. If so, please see this tutorial. If you still have problems, then please share your code.

Mynda

 
Posted : 08/09/2020 6:44 pm
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi Christine,

Your image shows the workbook embedded in a web page so I'll need the address of that web page and the embed code you are using from OneDrive.

If you are just using the test HTML page I created here https://www.myonlinetraininghub.com/interactive-excel-web-app-dashboard please supply that and the workbook embed code.

Regards

Phil

 
Posted : 09/09/2020 12:41 am
(@christine-haumonthotmail-com)
Posts: 2
New Member
Topic starter
 

Hi Mynda,

Here is my code

<div id="myExcelDiv" style="width: 700px; height: 750px"></div>
<!-- * This code uses the Microsoft Office Excel Javascript object model to programmatically insert the
* Excel Web App into a div with id=myExcelDiv. The full API is documented at
* https://msdn.microsoft.com/fr-FR/library/hh315812.aspx. There you can find out how to programmatically get
* values from your Excel file and how to use the rest of the object model. -->
<script type="text/javascript" src="https://onedrive.live.com/embed?resid=6575DB2DD5948D5%216247&authkey=%21APMLYYGNrBu4jLg&em=3&wdDivId=%22myExcelDiv%22&wdHideGridlines=1&wdHideHeaders=1&wdActiveCell=%22'Feuil1'!A1%22&wdAllowInteractivity=0"></script>

 
Posted : 09/09/2020 10:40 am
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi Christine,

Did you try putting that code into the example HTML file I provided here 

https://www.myonlinetraininghub.com/interactive-excel-web-app-dashboard

because it worked right away to hide the viewer bar when I did.

To remove the horizontal and vertical scroll bars (see attached image) you will need to modify the embed code from OneDrive. 

As it is the area of the sheet being embedded is very large.  You've probably got Entire Workbook selected in the 'What to show' area - see attached image. 

You should enter a range to display and then modify the width and height of the div in the embed code to accommodate this displayed range

id="myExcelDiv" style="width: 700px; height: 750px;"

The attached .txt file is actually a HTML file.  Download it, change the file extension to htm, upload it to a website and it will load your workbook.

Regards

Phil

 

scroll-bars.pngembed-options.png

 
Posted : 09/09/2020 8:36 pm
Share: