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

How to auto populate Word template using Open XML SDK 2.0

Published on

Here is some simple code that updates a word document template that contains 2 content controls in the template document called: MatterNumber DocType The template document is – C:UsersstilgoepWordTesttest-contentcontrol.docx The output document is – C:UsersstilgoepWordTesttest-contentcontrol-updated.docx You need to add the following 2 references: DocumentFormat.OpenXml WindowsBase.dll You will also need to download the Word Content Control … Continue reading How to auto populate Word template using Open XML SDK 2.0

Import Excel 2007 Spreadsheet as Sharepoint List Error Method ‘post’ of object ‘IOWSPostData’ failed

Published on

If you get the following error Method ‘post’ of object ‘IOWSPostData’ failed, you can fix it by doing the below: Do a search on you C: drive for a file named: EXPTOOWS.XLA Open it and Enable Macros Select the Developer tab and the Visual Bacis or press ALT+11. Same result. You are ready to alter … Continue reading Import Excel 2007 Spreadsheet as Sharepoint List Error Method ‘post’ of object ‘IOWSPostData’ failed

How the default Document Properties in Office documents used in the default MOSS 2007 SearchCenter search results

Published on

1) MOSS2007 uses the “Comments” field (from Document Properties) as its description. 2) MOSS2007 does not search the keywords assigned to an Office document via Document Properties. 3) For Word, Excel and PowerPoint documents, if you search for a word that appears in the document’s description (aka the “Comments” field), then the description is displayed … Continue reading How the default Document Properties in Office documents used in the default MOSS 2007 SearchCenter search results