Hello All,
In my previous post about Loading Employees in Siebel i described the process through CSV file and IO based approach.
In this post lets achieve the requirement with excel file and business service.
Prerequisite,
Formating the Excel File :
Here we are entering data from 2nd Row.
Now we need to write a business service that reads data row by row and insert data in siebel. Since we are reading data in terms of rows and columns, so 2nd Row 2nd column will fetch value Rahul , and 3rd Row 2nd column will fetch Ankit and this will be our base of iterating through the excel sheet.
Final Code :
In my previous post about Loading Employees in Siebel i described the process through CSV file and IO based approach.
In this post lets achieve the requirement with excel file and business service.
Prerequisite,
- Excel application installed on the machine (server), so this approach works only in Windows Environment.
- Accessible location where we need to place the Excel file
Formating the Excel File :
Here we are entering data from 2nd Row.
Now we need to write a business service that reads data row by row and insert data in siebel. Since we are reading data in terms of rows and columns, so 2nd Row 2nd column will fetch value Rahul , and 3rd Row 2nd column will fetch Ankit and this will be our base of iterating through the excel sheet.
Final Code :
- Reading Excel and Initializing BO and BO
var ExcelApp = COMCreateObject("Excel.Application");
ExcelApp.Workbooks.Open("C:/siebel/LoadEmployee.xlsx");
ExcelApp.Visible = false;
var oBOEmp = TheApplication().GetBusObject("Employee");
var oBCEmp = oBOLdVal.GetBusComp("Employee");
- Getting value from Excel columns
while(ExcelApp.ActiveSheet.Cells(i,1).Value!= null)
{
// Give the fields here
// Employee Details
var LastName = ExcelApp.ActiveSheet.Cells(i,1).Value;
var FirstName = ExcelApp.ActiveSheet.Cells(i,2).Value;
var Email = ExcelApp.ActiveSheet.Cells(i,3).Value;
var PhoneNumber = ExcelApp.ActiveSheet.Cells(i,4).Value;
var LoginName = ExcelApp.ActiveSheet.Cells(i,5).Value;
//Position Details
var Position = ExcelApp.ActiveSheet.Cells(i,6).Value;
//Responsibility Details
var Responsibility = ExcelApp.ActiveSheet.Cells(i,7).Value;
}
- Setting Fields Value and Invoking New Record
NewRecord(NewAfter);
SetFieldValue("Last Name",LastName);
SetFieldValue("First Name",FirstName);
SetFieldValue("Email",Email);
SetFieldValue("Phone Number",PhoneNumber);
SetFieldValue("Login Name",LoginName);
- Closing Excel File
ExcelApp.Quit();
ExcelApp = null;
Refer exact code and sample file here .. You can mail me for any comments or suggestions.
Thanks for info!
ReplyDeleteThanks for this instruction! Excel is not so easy as it may seem indeed. Everytime I have tasks with Excel I use the help of https://www.assignmentexpert.com/programming. They help me organize my projects so that it is easy for me to accomplish it. If I have difficulties understanding my assignments, they give me the problem solving assistance that I need and provide me with thorough explanation. Highly recommend this service!
ReplyDeleteMeet an experienced Programming
ReplyDeleteHomework Help expert, with more than 10 years of industry experience and who implemented solutions using Spring, Sling, Servlets and JSPs, and most recently, Adobe Experience Manager (AEM). Also, I am an Adobe Certified Developer in AEM 6 and have been developing components in the CMS for the last 4 years. I believe in my problem solving abilities which makes me one of the experts you would prefer to provide you C Homework Help .
I am a statistics professor with specialization in STATA. I offer both tutoring services and assignment completion services to students looking for Statistics Homework Help . If you are looking for a STATA Assignment Help expert then look no further. All my online classes are free while the assignments are completed at a reasonable fee. All your assignments are checked for grammar and plagiarism to ensure that you deliver the best to your lecturer.
ReplyDeleteHow legit is your tutoring, and what do you, tutor? I understand that SPSS is wide. It can be used to handle nearly every statistical problem. Obviously, I assume that you won't delve in deeper on the complexities of statistics. Before I avail your STATA Assignment Help service, I need to know what you offer at Statistics Homework Help .
ReplyDeleteHi, I have sent my Java assignment to your email as instructed in your Programming Assignment Help portal. I don’t have much time online and therefore I am requesting you to check it now so that you can give me a quotation. All the details of my assignment are provided and I hope you get me a well-experienced C++ Assignment Help tutor to work on it. Kindly note that deadlines mean everything to me and I don’t expect you to take me rounds about the delivery of the work.
ReplyDeleteDo you guys give a commission if someone decides to give you clients? I have more than 20 students who are looking for Programming Homework Help. I want to act as a broker between you and them provided we agree that you are going to pay me a certain percentage of the profit. If you prove to be reliable then I will give you a huge number of students because I have access to many of them.Right now I have couple of students looking for C++ Assignment Help.
ReplyDeleteMy advice to this company is one. Please don’t say you deliver timely Matlab assignment help yet some of your writers are too lazy to keep the deadlines. I was very clear that I needed my communications system assignment done within 24 hours and the person I gave the job promised he was going to keep time. Well, guess what, the person delivered the work two days later saying he had an issue with his laptop. I still don’t know what could have happened if I hadn’t been smart enough to lie about my deadline. It saved my life because I was able to hire another Matlab assignment helper for the task and this other person actually delivered the work in just 6 hours.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteProgramming is the process of creating and assembling several sets of computer programmers in order to reach a high - end computing output in a staged procedure. With so many programming languages to pick from, settling on the best one can be difficult. You won't have to worry about the difficulties of programming assignments with Assignmenthelped.Our Computer Assignment Help programmers can best help you. Visit now:- Computer Programming Assignment Help
ReplyDeleteIf you are looking for a spray that can help you get rid of various issues, then Millennium Stud 5000 Spray for Men 20gm is the best. This spray will start showing its effect in just a few uses. There are various side effects of this spray, so before you start applying it, make sure you are well aware of everything. You can also visit Omsdelhi for more detailed information.
ReplyDelete