public void Load(params RawSheet[] rawSheets) { foreach (RawSheet rawSheet in rawSheets) { var sheet = new Sheet("__intern__", rawSheet.TableName); sheet.Load(rawSheet); _sheets.Add(sheet); } }
public override void Load(string rawUrl, string sheetName, Stream stream) { s_logger.Trace("{filename} {sheet}", rawUrl, sheetName); RawUrl = rawUrl; foreach (RawSheet rawSheet in SheetLoadUtil.LoadRawSheets(rawUrl, sheetName, stream)) { var sheet = new Sheet(rawUrl, sheetName); sheet.Load(rawSheet); _sheets.Add(sheet); } if (_sheets.Count == 0) { throw new Exception($"excel:{rawUrl} 不包含有效的单元薄(有效单元薄的A0单元格必须是##)."); } }
private Sheet ReadSheet(IExcelDataReader reader, bool exportTestData) { var sheet = new Sheet(reader.Name ?? "", exportTestData); return(sheet.Load(reader) ? sheet : null); }