internal void Save(MemoryStream ms) { var doc = new CompoundDocumentFile(); WriteStorageAndStreams(Storage, doc.RootItem); doc.Write(ms); }
public void ReadEncLong() { var doc = File.ReadAllBytes(@"c:\temp\EncrDocRead.xlsx"); var cd = new CompoundDocumentFile(doc); var ms = new MemoryStream(); cd.Write(ms); File.WriteAllBytes(@"c:\temp\vba.xlsx", ms.ToArray()); }
public void Read() { //var doc = File.ReadAllBytes(@"c:\temp\vbaProject.bin"); var doc = File.ReadAllBytes(@"c:\temp\vba.bin"); var cd = new CompoundDocumentFile(doc); var ms = new MemoryStream(); cd.Write(ms); printitems(cd.RootItem); File.WriteAllBytes(@"c:\temp\vba.bin", ms.ToArray()); }