how I can hide the menu bar in php spreadsheet
hello everyone :)
how I can hide the menu bar in php spreadsheet ?
Thanks all <3
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();
$rangeSetting->dataSource($Json);
$rangeSettings = array($rangeSetting);
$sheet = new EJ\Spreadsheet\Sheet();
$sheet->rangeSettings($rangeSettings);
$sheet->columnWidth(100);
$sheet->frozenRows(1);
$sheets = array($sheet);
$menu= new EJ\Spreadsheet\MenuSetting();
$menu->isAppend(false);
$scroll = new EJ\Spreadsheet\ScrollSetting();
$scroll->height(1000);
$spreadsheet = new EJ\Spreadsheet('Spreadsheet');
echo $spreadsheet->sheets($sheets)->scrollSettings($scroll)->render();
SIGN IN To post a reply.
3 Replies
AD
Arunkumar Devendiran
Syncfusion Team
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.
PHP
|
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.
Regards,
Arunkumar D
SA
saddam
November 22, 2019 11:47 PM UTC
Thanks Mr Arunkumar
I would not to hide all the Ribbon same this
I would to keep the tabs (File , Home , Insert ... )
same in this pic
thanks <3 <3
I would not to hide all the Ribbon same this
I would to keep the tabs (File , Home , Insert ... )
same in this pic
thanks <3 <3
AD
Arunkumar Devendiran
Syncfusion Team
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.
PHP
|
echo $spreadsheet -> sheets($sheets) -> scrollSettings($scroll) -> loadComplete('loadComplete') -> render();
<script>
loadComplete: function () {
$("#" + this._id + "_Ribbon").data("ejRibbon").collapse();
// $("#" + this._id + "_Ribbon").data("ejRibbon").expand(); for expand the menu bar
}
</script>
|
Please let us know if you need further assistance.
Regards,
Arunkumar D
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
SA saddam
- Nov 20, 2019 08:35 AM UTC
- Nov 25, 2019 10:06 AM UTC
