private SheetReader LoadSheetReader(ulong id, bool hdr) { var worksheet = WorkBook.First(x => x.Id == id); var e = ZipArchive.GetEntry($"xl/{worksheet.Target}"); var sheetStream = e.Open(); return(new SheetReader(sheetStream, CachedSharedStrings, hdr)); }
/// <summary> /// 加载Sheet不包含头部 /// </summary> /// <param name="id">Sheet名称对应的Id</param> /// <returns></returns> public SheetWithoutHDR LoadSheet(ulong id) { var worksheet = WorkBook.First(x => x.Id == id); var e = ZipArchive.GetEntry($"xl/{worksheet.Target}"); using (var stream = e.Open()) { var sr = new StreamReader(stream); var result = sr.ReadToEnd(); return(new SheetWithoutHDR(worksheet.Id, result, this, CachedSharedStrings)); } }