Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created August 8, 2023 19:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/6596af4f6047aa20bd91dab81ab6333c to your computer and use it in GitHub Desktop.
Save bjoerntx/6596af4f6047aa20bd91dab81ab6333c to your computer and use it in GitHub Desktop.
// load the document part names from the spreadsheet document
var documentPartNames = LoadSettings.GetDocumentPartNames("spreadsheet.xlsx", StreamType.SpreadsheetML);
// load the first sheet
var ls = new LoadSettings() {
DocumentPartName = documentPartNames[0]
};
var dataStructure = "";
// handle the TableCreated event
textControl1.TableCreated += (sender, e) => TextControl1_TableCreated(out dataStructure, sender, e);
// load the document
textControl1.Selection.Load("spreadsheet.xlsx", StreamType.SpreadsheetML, ls);
Debug.WriteLine(dataStructure);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment