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

Add new export setting

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.

3 Replies

SD Saranya Dhayalan Syncfusion Team 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 



BJ Bjork February 6, 2020 12:50 PM UTC

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


SD Saranya Dhayalan Syncfusion Team 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 


Loader.
Live Chat Icon For mobile
Up arrow icon