Excel spell check using C#

前端 未结 2 1164
旧时难觅i
旧时难觅i 2021-01-27 01:13

some one just help me with this! why isn\'t this code working.I don\'t find much tutorials on the internet too.

Excel.Application xlApp;
Excel.Workbook xlWorkBoo         


        
2条回答
  •  悲哀的现实
    2021-01-27 01:32

    This code worked finally for me!!!. Pulled the data from Access Db and stored as a column in Excel and used the code to identify the wrongly spelled words in the excel sheet.

      for (int y = 0; y 

    The selection of the cell was the part which got me busy. Finally

     if (!(xlApp.CheckSpelling(xlWorkSheet.Range["A" + (y + 2) + ""].Value.ToString(), 
             udict, 1033)))
    

    worked. It showed "chk" against every wrongly spelled word.

提交回复
热议问题