- Exporting Data using Microsoft Graph and the OpenXML SDK
- What the code does
- Prerequisites
- Get started
- Follow the tutorial
In this repo you'll find steps to create an application which generates an Excel workbook and modify the application to drive the worksheet generation by data.
The code is generated initially by the Open XML SDK Productivity Tool. This reflects C# code from a template document. This provides the base from which customization can be made.
The worksheet generation is modified using snippets in this tutorial to build a table from Microsoft Graph generated JSON data.
- Microsoft Office account tenant for your team
- Visual Studio (Community is fine)
- NOTE: Install the following workloads for VS: - .Net desktop development - Office/Sharepoint development - .Net Core cross-platform development
- Git command line tools
- Web browser (Chrome or Edge are fine)
- Open XML SDK Productivity Tool
- Open XML SDK from nuget.org
-
Start by cloning this whole repository to your local system so you have all the data files, example reports, and folders. Use the Github
Clone or downloadbutton to copy the URL and then issue this command:git clone https://github.com/InteropEvents/ExportingDataWithOpenXMLTutorial.git -
Or, alternatively, download the zip file using the Github
Clone or downloadbutton: -
If you haven't already retrieved the OpenXML SDK Productivity Tool .msi installer from a local share, download it here:
https://github.com/InteropEvents/ExportingDataOpenXMLTools
The
OpenXMLSDKToolV25.msiin that repo will install the Open XML SDK Productivity Tool used in Module 1. -
You can also clone the working solution to a separate folder for reference from here:
git clone https://github.com/InteropEvents/ExportingDataWithOpenXMLSolution.git
-
Now you are ready to follow the tutorial. Start with Module 1, which walks you through generating the initial C# Open XML SDK project.
-
Complete the main tutorial by following Module 2. This will lead you through generating the Microsoft Graph data and and customizing the code to use the Microsoft Graph data to build the worksheet table.


