【发布时间】:2023-03-12 14:33:01
【问题描述】:
我正在使用 Microsoft Excel 12.0 对象库。我的目标是找到具有指定字体名称的文本并替换为新文本。
Microsoft.Office.Interop.Excel.Application xlApp = new Microsoft.Office.Interop.Excel.Application();
xlApp.FindFormat.Font.Name = "Arial";
workSheet.Cells.Replace('a', 'b', Type.Missing, Type.Missing, Type.Missing, Type.Missing, xlApp.FindFormat, Type.Missing);
但它不起作用。
那么如何找到具有指定字体名称的字符串并替换为新字符串呢?
谢谢!
【问题讨论】: