Naming Excel worksheets when exporting to Excel

Posted by: j2associates on 8 September 2017, 1:57 pm EST

  • Posted 8 September 2017, 1:57 pm EST

    Hello all,


    When exporting to Excel, is there any way to specify the worksheet names that are created within the workbook? Thanks in advance for any ideas and/or suggestions!

  • Replied 8 September 2017, 1:57 pm EST

    Hello,


    Currently this functionality is not supported in Spread for Windows Forms.You can add the desired sheet to another spread and then export it from there.


     


    Regards,


     

  • Replied 8 September 2017, 1:57 pm EST

    Hello,


    I'm not sure I understand your response. How will your suggestion end up naming the Excel worksheets? Thanks...

  • Replied 8 September 2017, 1:57 pm EST

    If I understood it correctly, you want to name the sheet while exporting to Excel.There is no direct method in Spread to give name to a Sheet while exporting to Excel. The work around that i found is to first Transfer the sheet to another hidden Spread(X) while giving it a name and Export that sheet from Spread(X) to Excel.


     


     


     

  • Replied 8 September 2017, 1:57 pm EST

    In addition to above if you are trying to change the sheetname within the Spread before the Export you Should be able to do that using SheetName property of SheetView Objects.below is the code snippet to change the name of sheets and add it to Spread.


    Dim FirstSheet As New FarPoint.Win.Spread.SheetView()


    FirstSheet.SheetName = "SheetOne"


    FpSpread1.Sheets.Add(FirstSheet)


     


    Thanks,

  • Replied 8 September 2017, 1:57 pm EST

    Sorry, I had a brain cramp. It has been a while since I exported to Excel. If you name your sheetviews, then the export process will name the Excel worksheets correspondingly.
  • Replied 8 September 2017, 1:57 pm EST

    If I understood it correctly, you want to name the sheet while exporting to Excel.There is no direct method in Spread to give name to a Sheet while exporting to Excel. The work around that i found is to first Transfer the sheet to another hidden Spread(X) while giving it a name and Export that sheet from Spread(X) to Excel.
  • Replied 8 September 2017, 1:57 pm EST

    Hello Bob,


    When the spread is exported, it will name the Excel worksheets corresponding to the SheetView.SheetNames.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels