I managed to work recently on many sites that required importing Data into Sitecore from an Excel Sheet. These Data might be from Sharepoint, xml, Migrated data, actually any kind of data that you managed to store in Excel and need to import into Sitecore.
Below, a number of code snippets that allows you to do so by using CSharpJExcel.Jxl library to read Excel sheets.
Create a method to that takes the destination path (where the new Item would be stored in Sitecore tree), Item name and the template ID from which the new Item would be created.
Once the Sitecore item is created, you can loop through all the item fields to update the Sitecore Item field with the new value. This method takes a Sitecore item, Sitecore field and the new value to update the field.
The last step would be to read the Excel sheet, loop through…
View original post 117 more words