//create a new workbook var workbook = new GrapeCity.Documents.Excel.Workbook(); IWorksheet worksheet = workbook.Worksheets[0]; // Prepare data const string CorrectWord = "Macro"; worksheet.Range["A1:D5"].Value = CorrectWord; const string MisspelledWord = "marco"; worksheet.Range["A2,C3,D1"].Value = MisspelledWord; // Find the first misspelled word IRange searchRange = worksheet.Range["A1:D5"]; IRange firstMisspelled = searchRange.Find(MisspelledWord); // Mark it with red foreground firstMisspelled.Font.Color = System.Drawing.Color.Red;
' Create a new Workbook Dim workbook As New Workbook Dim worksheet As IWorksheet = workbook.Worksheets(0) ' Prepare data Const CorrectWord = "Macro" worksheet.Range("A1:D5").Value = CorrectWord Const MisspelledWord = "marco" worksheet.Range("A2,C3,D1").Value = MisspelledWord ' Find the first misspelled word Dim searchRange As IRange = worksheet.Range("A1:D5") Dim firstMisspelled = searchRange.Find(MisspelledWord) ' Mark it with red foreground firstMisspelled.Font.Color = System.Drawing.Color.Red ' save to an excel file workbook.Save("FindBasicUsage.xlsx")