library/openxlsx/implementation/sources/XLSheet_Impl.cpp
void Impl::XLSheet::SetName(const std::string& name) {

    // ===== Update defined names
    m_parentWorkbook.UpdateSheetName(m_sheetName.value(), name);

    // ===== Change sheet name in main .xml files
    m_sheetName.set_value(name.c_str());
    m_nodeInWorkbook.attribute("name").set_value(name.c_str());
    m_nodeInApp.text().set(name.c_str());

}
/**
 * @details This method sets the name of the sheet to a new name, in the following way:
 * - Set the m_sheetName property to the new name.
 * - In the sheet node in the workbook.xml file, set the name attribute to the new name.
 * - Set the value of the title node in the app.xml file to the new name
 * - Set the m_isModified property to true.
 */
@details This method sets the name of the sheet to a new name, in the following way:
- Set the m_sheetName property to the new name.
- In the sheet node in the workbook.xml file, set the name attribute to the new name.
- Set the value of the title node in the app.xml file to the new name
- Set the m_isModified property to true.
@details This method sets the name of the sheet to a new name in the following way : - Set the m_sheetName property to the new name . - In the sheet node in the workbook . xml file set the name attribute to the new name . - Set the value of the title node in the app . xml file to the new name - Set the m_isModified property to true .
void Impl::XLSheet::SetName(const std::string& name) {
    m_parentWorkbook.UpdateSheetName(m_sheetName.value(), name);
    m_sheetName.set_value(name.c_str());
    m_nodeInWorkbook.attribute("name").set_value(name.c_str());
    m_nodeInApp.text().set(name.c_str());
}
void Impl :: XLSheet :: SetName ( const std :: string & name ) { m_parentWorkbook . UpdateSheetName ( m_sheetName . value ( ) , name ) ; m_sheetName . set_value ( name . c_str ( ) ) ; m_nodeInWorkbook . attribute ( " " ) . set_value ( name . c_str ( ) ) ; m_nodeInApp . text ( ) . set ( name . c_str ( ) ) ; }
@details This method sets the name of the sheet to a new name, in the following way:
 - Set the m_sheetName property to the new name.
@details This method sets the name of the sheet to a new name in the following way : - Set the m_sheetName property to the new name .
// ===== Update defined names // ===== Change sheet name in main .xml files