UmyaSpreadsheet.PerformanceFunctions (umya_spreadsheet_ex v0.7.0)
View SourceFunctions for optimized file writing with reduced memory usage.
Summary
Functions
Writes a spreadsheet to a file with reduced memory consumption.
Writes a password-protected spreadsheet to a file with reduced memory consumption.
Functions
Writes a spreadsheet to a file with reduced memory consumption.
This variant is suitable for very large spreadsheets that would otherwise
exceed memory limits when written with the standard write/2
function.
Parameters
spreadsheet
- The spreadsheet structpath
- Path where the file should be written
Returns
:ok
on success{:error, reason}
on failure
Examples
{:ok, spreadsheet} = UmyaSpreadsheet.read_file("input.xlsx")
:ok = UmyaSpreadsheet.write_light(spreadsheet, "large_file.xlsx")
Writes a password-protected spreadsheet to a file with reduced memory consumption.
This variant is suitable for very large spreadsheets that would otherwise
exceed memory limits when written with the standard write_with_password/3
function.
Parameters
spreadsheet
- The spreadsheet structpath
- Path where the file should be writtenpassword
- Password to protect the file with
Returns
:ok
on success{:error, reason}
on failure
Examples
{:ok, spreadsheet} = UmyaSpreadsheet.read_file("input.xlsx")
:ok = UmyaSpreadsheet.write_with_password_light(spreadsheet, "protected_large_file.xlsx", "secret123")