Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it possible to set UseZip64 flag #1207

Merged
merged 1 commit into from
Nov 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion ooxml/XSSF/Streaming/SXSSFWorkbook.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ public int RandomAccessWindowSize
/// </summary>
private bool _compressTmpFiles = false;

/// <summary>
/// setting this flag On allows to write large files;
/// however, this can lead to compatibility issues
/// </summary>
private UseZip64 _useZip64 = UseZip64.Off;

/// <summary>
/// shared string table - a cache of strings in this workbook.
/// </summary>
Expand Down Expand Up @@ -152,6 +158,13 @@ public bool IsHidden
set { XssfWorkbook.IsHidden = value; }
}

public UseZip64 UseZip64
{
get { return _useZip64; }

set { _useZip64 = value; }
}


#region Constructors
/**
Expand Down Expand Up @@ -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();
Expand Down
Loading