Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created February 7, 2023 10:44
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/17b5489809bdee526e02aae62e54ae84 to your computer and use it in GitHub Desktop.
Save bjoerntx/17b5489809bdee526e02aae62e54ae84 to your computer and use it in GitHub Desktop.
private void ImportSpreadsheets(string filename, string[] sheetNames) {
foreach (string sheetName in sheetNames) {
TXTextControl.LoadSettings ls = new TXTextControl.LoadSettings() {
DocumentPartName = sheetName
};
textControl1.Selection.Load(filename, TXTextControl.StreamType.SpreadsheetML, ls);
}
}
ImportSpreadsheets("cashflow.xlsx", new string[] { "2021", "2022" });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment