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

how I can hide the menu bar in php spreadsheet

Thread ID:





149249 Nov 20,2019 08:35 AM UTC Nov 25,2019 10:06 AM UTC PHP 3
Tags: Spreadsheet
Asked On November 20, 2019 08:35 AM UTC

hello everyone :)

how I can hide the menu bar in php spreadsheet ?

Thanks all <3 

require_once 'EJ/AutoLoad.php';
$Json = array();
$rangeSetting = new EJ\Spreadsheet\RangeSetting();
$rangeSettings = array($rangeSetting);
$sheet = new EJ\Spreadsheet\Sheet();
$sheets = array($sheet);
$menu= new EJ\Spreadsheet\MenuSetting();
$scroll = new EJ\Spreadsheet\ScrollSetting();
$spreadsheet = new EJ\Spreadsheet('Spreadsheet');
echo $spreadsheet->sheets($sheets)->scrollSettings($scroll)->render();

Arunkumar Devendiran [Syncfusion]
Replied On November 21, 2019 07:16 PM UTC

Hi saddam, 
Thank you for contacting Syncfusion support. 
We have checked your query and you can achieve this by using “showRibbon” property to hide and unhide the ribbon. We would inform you that we have already achieved that in our online demo sample. Please refer the below code snippet and sample link. 
echo $spreadsheet->showRibbon(false)->sheets($sheets)->scrollSettings($scroll)->render() 
Sample Link: 
Could you please check the above link and get back to us with more information if we misunderstood your requirement or need further assistance. 
Arunkumar D 

Replied On November 22, 2019 11:47 PM UTC

Thanks Mr Arunkumar 

I would not to hide all the R
ibbon same this 

I would to keep the tabs (File , Home , Insert ... )

same in this pic

thanks <3 <3 

Arunkumar Devendiran [Syncfusion]
Replied On November 25, 2019 10:06 AM UTC

Hi Saddam, 
Good day to you. 
We would inform that your requirement is achieved by collapse() method. Using loadComplete event, you can hide the ribbon menu bar initially on spreadsheet rendering. Please refer the below code snippet. 
echo $spreadsheet -> sheets($sheets) -> scrollSettings($scroll) -> loadComplete('loadComplete') -> render(); 
loadComplete: function () { 
        $("#" + this._id + "_Ribbon").data("ejRibbon").collapse(); 
    // $("#" + this._id + "_Ribbon").data("ejRibbon").expand();         for expand the menu bar 
Please let us know if you need further assistance. 
Arunkumar D 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon