Hi,
I achieve this by including Microsoft.Office.Interop.Excel refereence dll in my Infopath code Editor and added below Code,
ApplicationClass xlsApp = new ApplicationClass();
WorkbookClass xlsWrkBook = (WorkbookClass)xlsApp.Workbooks.Open(("XXX.xlsx", 0, false, 5, "", "", true,XlPlatform.xlWindows, "\t", false, false, 0, true, 1, 0);
Worksheet xlsWrkSht = (Worksheet)xlsWrkBook.Worksheets.get_Item(i);
Range ExcelCellReadData1 = (Range)xlsWrkSht.Cells[x, y];
string del1 = ExcelCellReadData1.Text.ToString();
LocalFormData.SelectSingleNode("XXX", this.NamespaceManager).SetValue(del1);
xlsWrkBook.Save();
xlsWrkBook.Close(0, 0, 0);
It works for me to fetch data from Excel and Populate it into Infopath Form.
Regards,
Sivakumar G