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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Add new export setting

Thread ID:

Created:

Updated:

Platform:

Replies:

151270 Feb 5,2020 01:08 PM UTC Feb 7,2020 07:03 AM UTC JavaScript - EJ 2 3
loading
Tags: Spreadsheet
Bjork
Asked On February 5, 2020 01:08 PM UTC

Is there a way to expand the 3 default options "excel, csv and pdf" to have a new custom one like "mobi"/"doc" and this be render in de toolbar "File"->"Save as"?

I've tried using addTabGroup but this seems to apply only for the tabs other than the file one.

Saranya Dhayalan [Syncfusion]
Replied On February 6, 2020 09:06 AM UTC

Hi Stheve 
 
Thank you for contacting Syncfusion support 
 
We have checked your reported query, we can achieve this in created event by using addFileMenuItems method. Please find the below code snippet: 
 
  created: (): void => { 
           spreadsheet.addFileMenuItems([{ text: 'mobi/doc', iconCss: 'e-save e-icons' }], 'Comma-separated values'); // added the items in file menu 
        } 
 
For your convenience we have prepared a sample. Please find the below sample link: 
 
 
Could you please check the above sample and get back to us if you need further assistance on this? 
 
Regards, 
Saranya D 


Bjork
Replied On February 6, 2020 12:50 PM UTC

Do I have a equivalent way to apply the same in Ej1?

Saranya Dhayalan [Syncfusion]
Replied On February 7, 2020 07:03 AM UTC

Hi Stheve  
 
Query Do I have a equivalent way to apply the same in Ej1? 
 
Yes, we can achieve this in EJ1 spreadsheet. To convert Backstage item to Menu format in ribbonSettings property. Add the menu item in File - > save As addMenuItem method. Please find the below code snippet: 
 
   $(function () { 
            $("#Spreadsheet").ejSpreadsheet({ 
                enableContextMenu: false, 
                allowCellType: true, 
                allowFormulaBar: false, 
               ribbonSettings: { 
                enableOnDemand: false, 
                applicationTab: { 
                    type: ej.Ribbon.ApplicationTabType.Menu, 
                    menuSettings: { 
                        isAppend: true, 
                        dataSource: [] 
                    } 
                } 
            }, 
                 
                loadComplete: "loadComplete" 
            }); 
        }); 
        function loadComplete(args) { 
            var xlFormat = this.XLFormat, xlEdit = this.XLEdit; 
            this.XLRibbon.addMenuItem([{ id: "SignIn1", text: "Mobi/doc", parentId: "ExportXL", spriteCssClass: "e-icon e-ssr-cut" }], 6); // 6 -index 
            if (!this.model.isImport) { 
                this.sheetRename("Cell Type"); 
                this.setWidthToColumns([133, 93, 59, 59, 122, 142, 92, 142, 82]); 
                this.XLResize.setRowHeight(4, 27); 
                
            } 
        } 
 
For your convenience we have prepared a sample. Please find the below sample link: 
 
 
 
Could you please check the above sample and get back to us if you need further assistance on this? 
 
 
Regards, 
Saranya D 


CONFIRMATION

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