Title: Renaming sheers
Last modified: August 18, 2020

---

# Renaming sheers

 *  Resolved [nessumsar](https://wordpress.org/support/users/nessumsar/)
 * (@nessumsar)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/renaming-sheers/)
 * Could you give an example on how to use this gfexcel_renderer_worksheet_title
   hook? Pretty sure it’s a filter hook?
 * I’ll try to give you some context for you.
    We’ve made a “Worksheet.php” with
   an inner class called Worksheet that takes a label and field_IDs in the constructor.
   Then we create all the sheets like this in our kotp file.
 * $red_tide_sheet = new Worksheet(“Red Tide”, array(2, 6, 16, 15));
 * I’m not sure but I belive I should use the hook in kotp somehow.
 * Thanks for awesome support. I’ll help you translate your plugin to swedish (when
   I’ve got time) as a thanks for your assistance.
 * (Apparently I couldn’t reply in our email-conversation)
 * //Lukas
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Frenaming-sheers%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Plugin Author [Doeke Norg](https://wordpress.org/support/users/doekenorg/)
 * (@doekenorg)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/renaming-sheers/#post-13272993)
 * HI Lukas,
 * Sure. Here you go [https://gist.github.com/doekenorg/6144f6096829a3717d66fd6fdd42a702](https://gist.github.com/doekenorg/6144f6096829a3717d66fd6fdd42a702).
 * You can combine it with your own code to make sure you get a different title 
   when called 3 times in a row 🙂
 * Hope this helps.
 *  Thread Starter [nessumsar](https://wordpress.org/support/users/nessumsar/)
 * (@nessumsar)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/renaming-sheers/#post-13274439)
 * Thanks!
 * I’ve tried to modify it to get a different title every time I call the function
   but I do not succeed, would you mind giving me some help?
 * Also when I try to use this hook, all my sheets turn out to be exactly the same.
   Could be that I have messed up my code, or is it possible that this hook effects
   that?
 *  Thread Starter [nessumsar](https://wordpress.org/support/users/nessumsar/)
 * (@nessumsar)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/renaming-sheers/#post-13279559)
 * Also when I try to use this hook, all my sheets turn out to be exactly the same.
   Could be that I have messed up my code, or is it possible that this hook effects
   that?
 * Forget about this part, it was me who messed up my code a bit. Still haven’t 
   solved getting different titles on the sheets.
 * Currently I have 25 sheets and the last sheet is supposed to be called “Övrig”.
   All sheets get this name right now. If I remove the sheet called “Övrig”, all
   the sheets is named “Gloria” which is the last one when removing “Övrig”. So 
   it seems like it will take the last title from the last sheet and put it on all
   sheets.
 *  Plugin Author [Doeke Norg](https://wordpress.org/support/users/doekenorg/)
 * (@doekenorg)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/renaming-sheers/#post-13279570)
 * [@nessumsar](https://wordpress.org/support/users/nessumsar/) please share your
   code so I can take a look at it.
 *  Thread Starter [nessumsar](https://wordpress.org/support/users/nessumsar/)
 * (@nessumsar)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/renaming-sheers/#post-13279646)
 * [https://github.com/Nessumsar/gfexcel_for_doeke](https://github.com/Nessumsar/gfexcel_for_doeke)
 * I added a few extra files that might or not effect the outcome here. Check the
   kotp.php file, I think the problems is only in that file and worksheet.php.
 * I’ve tried a few different things but I just cleaned the code to be in the “original
   state” in order to skip unnecessary code.
 * Thanks a lot.
 *  Plugin Author [Doeke Norg](https://wordpress.org/support/users/doekenorg/)
 * (@doekenorg)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/renaming-sheers/#post-13279692)
 * [@nessumsar](https://wordpress.org/support/users/nessumsar/) I’ll take a look
   at it as soon as I have time. But today is my wedding anniversary so I can’t 
   make any promises. But at first glance: You are not checking the form ID anywhere
   for the sheet name. So yes, every sheet will have the same name now 🙂 You need
   to use the $form variable like I mentioned in the code.
 *  Thread Starter [nessumsar](https://wordpress.org/support/users/nessumsar/)
 * (@nessumsar)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/renaming-sheers/#post-13279707)
 * Alright, take your time! No worries.
    Thanks for the hint. I’ll update here if
   I manage to solve it.
 * Have an awesome anniversary! 🙂
 *  Thread Starter [nessumsar](https://wordpress.org/support/users/nessumsar/)
 * (@nessumsar)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/renaming-sheers/#post-13304897)
 * Any ideas?
 * Got no clue how to use $form in order to give the sheets unique names…
 *  Plugin Author [Doeke Norg](https://wordpress.org/support/users/doekenorg/)
 * (@doekenorg)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/renaming-sheers/#post-13306783)
 * You can use the same logic you have for `should_disable_field()`. Retrieve the
   current sheet the same way, but then retrieve the title. You need to remove the
   hook from the worksheet class. Because that is now causing you the problems.
 * I’m sorry I can’t do anymore.
 *  Thread Starter [nessumsar](https://wordpress.org/support/users/nessumsar/)
 * (@nessumsar)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/renaming-sheers/#post-13308419)
 * You’re an angel mate!

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Renaming sheers’ is closed to new replies.

 * ![](https://ps.w.org/gf-entries-in-excel/assets/icon.svg?rev=3434379)
 * [GravityExport Lite for Gravity Forms](https://wordpress.org/plugins/gf-entries-in-excel/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gf-entries-in-excel/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gf-entries-in-excel/)
 * [Active Topics](https://wordpress.org/support/plugin/gf-entries-in-excel/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gf-entries-in-excel/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gf-entries-in-excel/reviews/)

## Tags

 * [sheets](https://wordpress.org/support/topic-tag/sheets/)

 * 10 replies
 * 2 participants
 * Last reply from: [nessumsar](https://wordpress.org/support/users/nessumsar/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/renaming-sheers/#post-13308419)
 * Status: resolved