Chapter 5. Application Integration

For this final chapter, I will address connecting a LightSwitch application to multiple external data sources, starting with Excel files. It’s a pretty safe assumption that where you find Microsoft SharePoint, you’ll also find Microsoft Office. Exporting data to Microsoft Excel is a built-in capability of the product. Importing data from either Excel or a comma separated value (CSV) file requires an extension but brings with it some added functionality. Having the ability to both import and export data makes it possible to move data between different systems.

Using Microsoft SQL Server Express 2008 for the underlying database is fine if you have total control over the data, but it’s not an uncommon task to need to connect to other databases. I’ll show you how to directly connect to a SQLite database using a freely available download. The other big topic for this chapter is integrating with cloud services like Google. While you could write a lot of code to connect with Google Calendar, I’ll be using a third-party extension that only requires a few lines of code to implement.

Easy Excel Integration

For this example, we’re going to build a sample app that connects to the Calendar list of our demo SharePoint site. The cool part of this example is the ability to import a list of calendar events from Excel. To get started, we’ll follow the same basic process of creating a new Visual Studio LightSwitch app as in the previous chapters, with the exception ...

Get SharePoint Apps with LightSwitch now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.