I’m using Microsoft Excel 12.0 Object Library. My goal is to find text with specified font name and replace with new text.
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);
but it does not works.
So how to find string with specified font name and replace with new string?
Thank you!
Im not that fluent with c# here is the vb.net code:
I ran a convertor which spat out C#: