protected virtual void DoWriteSpreadTable(Spreadsheet.SCSpreadsheet spreadsheet, string fileName, string tableName, SpreadTableOptions options) { options ??= new SpreadTableOptions(); options._Spreadsheet = spreadsheet; options._FileName = fileName; options._TableName = tableName; var book = options.Book?.Document ?? Document; string htmlTable = null; if ((spreadsheet == null && !string.IsNullOrWhiteSpace(fileName)) || spreadsheet != Host?.Spreadsheet) { htmlTable = GenerateTableHtml(options); } ExecuteSynchronized(() => { if (htmlTable == null) { htmlTable = GenerateTableHtml(options); } DoWriteSpreadTable(book, options, htmlTable); }); }
public SCBook WriteSpreadTable(Spreadsheet.SCSpreadsheet spreadsheet, string tableName, SpreadTableOptions options = null) { DoWriteSpreadTable(spreadsheet, null, tableName, options); return(this); }