Class LowCodeSaveOptionsProviderOfPlaceHolders

Class LowCodeSaveOptionsProviderOfPlaceHolders

Namespace: Aspose.Cells.LowCode
Assembly: Aspose.Cells.dll (25.4.0)

Implementation to provide save options which save split parts to files and the path of resultant file are defined with placeholders.

public class LowCodeSaveOptionsProviderOfPlaceHolders : AbstractLowCodeSaveOptionsProvider

Inheritance

object AbstractLowCodeSaveOptionsProvider LowCodeSaveOptionsProviderOfPlaceHolders

Inherited Members

AbstractLowCodeSaveOptionsProvider.GetSaveOptions(SplitPartInfo) , AbstractLowCodeSaveOptionsProvider.Finish(LowCodeSaveOptions)

Constructors

LowCodeSaveOptionsProviderOfPlaceHolders(string)

Instantiates an instance to provide save options according to specified templates.

public LowCodeSaveOptionsProviderOfPlaceHolders(string pathTemplate)

Parameters

pathTemplate string

The template of the resultant file path.

Remarks

The supported placeholders in file path template:

  • ${SheetIndex}: will be replaced by the sheet index of the split part
  • ${SheetName}: will be replaced by the sheet name of the split part
  • ${SplitPartIndex}: will be replaced by the index of the split part
  • ${SheetIndexPrefix}: will be replaced by Aspose.Cells.LowCode.LowCodeSaveOptionsProviderOfPlaceHolders.SheetIndexPrefix
  • ${SheetNamePrefix}: will be replaced by Aspose.Cells.LowCode.LowCodeSaveOptionsProviderOfPlaceHolders.SheetNamePrefix
  • ${SplitPartPrefix}: will be replaced by Aspose.Cells.LowCode.LowCodeSaveOptionsProviderOfPlaceHolders.SplitPartPrefix

Properties

BuildPathWithSheetAlways

Whether add sheet index or name to file path always. Default value is false, that is, when there is only one sheet, the sheet index and name and corresponding prefix(Aspose.Cells.LowCode.LowCodeSaveOptionsProviderOfPlaceHolders.SheetNamePrefix) will not be added to the file path.

public bool BuildPathWithSheetAlways { get; set; }

Property Value

bool

BuildPathWithSplitPartAlways

Whether add split part index to file path always. Default value is false, that is, when there is only one split part, the split part index and corresponding prefix(Aspose.Cells.LowCode.LowCodeSaveOptionsProviderOfPlaceHolders.SplitPartPrefix) will not be added to the file path.

public bool BuildPathWithSplitPartAlways { get; set; }

Property Value

bool

SaveOptionsTemplate

The template for creating instance of save options in Aspose.Cells.LowCode.LowCodeSaveOptionsProviderOfPlaceHolders.GetSaveOptions(Aspose.Cells.LowCode.SplitPartInfo).

public LowCodeSaveOptions SaveOptionsTemplate { get; set; }

Property Value

LowCodeSaveOptions

Remarks

If the template has been specified, then the created instance will copy all setting from it and update the output file accordingly.

SheetIndexOffset

Offset of sheet’s index between what used in file path and its actual value(Aspose.Cells.LowCode.SplitPartInfo.SheetIndex).

public int SheetIndexOffset { get; set; }

Property Value

int

SheetIndexPrefix

Prefix for the index of worksheet.

public string SheetIndexPrefix { get; set; }

Property Value

string

Remarks

If there is only one worksheet and Aspose.Cells.LowCode.LowCodeSaveOptionsProviderOfPlaceHolders.BuildPathWithSheetAlways is false, then this prefix and the sheet index(or name) will not be added to the resultant file path.

SheetNamePrefix

Prefix for the index of worksheet.

public string SheetNamePrefix { get; set; }

Property Value

string

Remarks

If there is only one worksheet and Aspose.Cells.LowCode.LowCodeSaveOptionsProviderOfPlaceHolders.BuildPathWithSheetAlways is false, then this prefix and the sheet index(or name) will not be added to the resultant file path.

SplitPartIndexOffset

Offset of split part’s index between what used in file path and its actual value(Aspose.Cells.LowCode.SplitPartInfo.PartIndex).

public int SplitPartIndexOffset { get; set; }

Property Value

int

SplitPartPrefix

Prefix for the index of split part.

public string SplitPartPrefix { get; set; }

Property Value

string

Remarks

If there is only one split part and Aspose.Cells.LowCode.LowCodeSaveOptionsProviderOfPlaceHolders.BuildPathWithSplitPartAlways is false, then this prefix and the split part index(0) will not be added to the resultant file path.

Methods

GetSaveOptions(SplitPartInfo)

Gets the save options from which to get the output settings for currently split part.

public override LowCodeSaveOptions GetSaveOptions(SplitPartInfo part)

Parameters

part SplitPartInfo

Returns

LowCodeSaveOptions

 English