Click here to Skip to main content
15,916,463 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using this code to retrieve the receipient name and receipient number but the recpt.receipient_name and recpt.receipient_number are null.

C#
//select names from the excel file with specified sheet name
                        var receipients = from n in messages.Worksheet<BulkSmsModel>(sheetName)
                                    select n;


                        foreach (var recpt in receipients)
                        {

                            BulkSms newRecpt = new BulkSms();
                            if (recpt.receipient_number.Equals("") == true || recpt.receipient_number == 0)
                            {
                                continue;
                            }
                            newRecpt.receipient_name = recpt.receipient_name;
                            newRecpt.receipient_number = Int32.Parse(recpt.receipient_number.ToString());

                            IBsmsRepo.insertReceipient(newRecpt);
                            IBsmsRepo.save();
                        }
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900