How to create an Excel Workbook from an SQL database using Open XML SDK 2.0

Published on

Below is the C# code to create a new Excel workbook based on a template file & populated by an SQL database. You need to add references to: DocumentFormat.OpenXml System.Data.Linq Windows.Base using System; using System.IO; using System.Data; using System.Collections.Generic; using System.Linq; using System.Text; using DocumentFormat.OpenXml.Packaging; using DocumentFormat.OpenXml.Spreadsheet; using DocumentFormat.OpenXml; namespace ElitetoExcel { class Program { … Continue reading How to create an Excel Workbook from an SQL database using Open XML SDK 2.0

Populating an Infopath dropdown using a specific Sharepoint list view

Published on

If you have a Sharepoint list containing multiple views, one view shows all approved items and another view shows all items that are pending approval. You have an Infopath form where you have a dropdown control that you want to be populated with only ‘Approved’ list items from your Sharepoint list. If you create your … Continue reading Populating an Infopath dropdown using a specific Sharepoint list view

Converting a Sharepoint List into XML

Published on

This easiest way is to use the URL below & insert your list GUID http://servername/site/_vti_bin/owssvr.dll?Cmd=Display&List=*YOURUNIQUELISTID*&XMLDATA=TRUE To get the GUID of the list you need to go into the list & click ‘Settings’ -> ‘List Settings’. Now if you look at your URL you will see something like: /_layouts/listedit.aspx?List=%7B7B476F98%2D1075%2D4A6D%2D8F63%2D4C754B3F41FC%7D The URL is encoded so you will … Continue reading Converting a Sharepoint List into XML