This topic has been archived. It cannot be replied.
-
工作学习 / 学科技术讨论 / Excel question: there are multiple excel files that all contain a sheet with same sheet name, such as AAA. Now I want to change the sheet name to BBB. I don't want to repeat open-rename-close the files, does anyone know how to change sheet name at once.Thank you.
-xxu99(春眠不觉晓);
2011-4-19
{10}
(#6630530@0)
-
不知道有什么常规做法,但是花了几分钟写了一个.net程序可以帮你转换,如果需要,pm 你的邮箱,前提是你需要安装.net 4.0
-binghongcha76(一只大猫);
2011-4-20
(#6632172@0)
-
贴出原代码,欢迎转载,讨论
-binghongcha76(一只大猫);
2011-4-20
{6510}
(#6632261@0)
-
workBook.Save(); 要在改名字之后,要不白存一次49: if (((dynamic)sheet).Name == oldSheetName)
50: {
51: ((dynamic)sheet).Name = newSheetName;
workBook.Save();
52: break;
53: }
54: }
55:
56: 57: workBook.Close();
-c1xwy(洪兴罩俺去战斗);
2011-4-20
{325}
(#6632296@0)
-
OK,明白你的意思,确实应该这么改一下,thanks
-binghongcha76(一只大猫);
2011-4-20
(#6632369@0)
-
快猫.
-healthy321(领导说:做人要低调.);
2011-4-20
(#6632368@0)
-
If we have both 2007 and 2003 spreadsheets?
-deep_blue(BLUE);
2011-4-24
(#6638560@0)