diff --git a/ooxml/XSSF/Streaming/SXSSFWorkbook.cs b/ooxml/XSSF/Streaming/SXSSFWorkbook.cs index 45ff5adcd..888355792 100644 --- a/ooxml/XSSF/Streaming/SXSSFWorkbook.cs +++ b/ooxml/XSSF/Streaming/SXSSFWorkbook.cs @@ -101,6 +101,12 @@ public int RandomAccessWindowSize /// private bool _compressTmpFiles = false; + /// + /// setting this flag On allows to write large files; + /// however, this can lead to compatibility issues + /// + private UseZip64 _useZip64 = UseZip64.Off; + /// /// shared string table - a cache of strings in this workbook. /// @@ -152,6 +158,13 @@ public bool IsHidden set { XssfWorkbook.IsHidden = value; } } + public UseZip64 UseZip64 + { + get { return _useZip64; } + + set { _useZip64 = value; } + } + #region Constructors /** @@ -444,7 +457,7 @@ private void InjectData(FileInfo zipfile, Stream outStream, bool leaveOpen) try { zos.IsStreamOwner = !leaveOpen; - zos.UseZip64 = UseZip64.Off; + zos.UseZip64 = _useZip64; //ZipEntrySource zipEntrySource = new ZipFileZipEntrySource(zip); //var en = zipEntrySource.Entries; var en = zip.GetEnumerator();