J
Jorge Ribeiro
Hello
I'me trying to rename several worksheets with the folowing code.
When my worksheets are visible the renaming process throws an exception
Excel.worksheet sheet = ...
string oldName = sheet.Name;
Excel.XlSheetVisibility visibility = sheet.Visible;
// change name
sheet.Visible =
Microsoft.Office.Interop.Excel.XlSheetVisibility.xlSheetVisible;
string newName = name + node.Attributes["suffix"].Value;
sheet.Name = newName;
sheet.Visible = visibility;
the newName string is well formed and my code only breaks at instruction
sheet.Name = newName; (error 0x800A03EC...)
it all goes well when my sheet is originally veryhidden.
when it is visible it sends an error
i'me running out of ideas.. can anyone help me
best regards
Jorge
I'me trying to rename several worksheets with the folowing code.
When my worksheets are visible the renaming process throws an exception
Excel.worksheet sheet = ...
string oldName = sheet.Name;
Excel.XlSheetVisibility visibility = sheet.Visible;
// change name
sheet.Visible =
Microsoft.Office.Interop.Excel.XlSheetVisibility.xlSheetVisible;
string newName = name + node.Attributes["suffix"].Value;
sheet.Name = newName;
sheet.Visible = visibility;
the newName string is well formed and my code only breaks at instruction
sheet.Name = newName; (error 0x800A03EC...)
it all goes well when my sheet is originally veryhidden.
when it is visible it sends an error
i'me running out of ideas.. can anyone help me
best regards
Jorge