Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public override CompileResult Execute(IList<FunctionArgument> arguments, Parsing
if (cellPic == null || context.Configuration.AlwaysRefreshImageFunction)
{
var httpsService = context.CurrentWorksheet._package.Settings.ImageFunctionService;
if (httpsService == null)
if (httpsService == null || context.Configuration.DisableImageFunctionDownloads)
{
return CreateResult(eErrorType.Name);
}
Expand Down
7 changes: 7 additions & 0 deletions src/EPPlus/FormulaParsing/ParsingConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ public class ParsingConfiguration
/// </summary>
public bool AlwaysRefreshImageFunction { get; set; } = false;

/// <summary>
/// If true the IMAGE function will never download external content in formula calculation.
/// It will instead return the NAME error as if the function was not implemented.
/// NB! This property overrides the <see cref="AlwaysRefreshImageFunction"/> property if set to true.
/// </summary>
public bool DisableImageFunctionDownloads{ get; set; } = false;

/// <summary>
/// Enables Unicode-aware string operations, ensuring correct handling of surrogate pairs for comparisons, substrings, and sorting within the library.
/// </summary>
Expand Down
Loading