Class LowCodeSaveOptions

LowCodeSaveOptions class

Options for saving generated results in low code way.

public class LowCodeSaveOptions

Constructors

NameDescription
LowCodeSaveOptions()The default constructor.

Properties

NameDescription
OutputFile { get; set; }Gets and sets the file(with path if needed) for saving the generated data. When setting this property with value other than null or empty string, OutputStream will be ignored.
OutputStream { get; set; }Gets and sets the Stream for writing the generated data to. When setting this property with value other than null, OutputFile will be ignored.
virtual SaveFormat { get; set; }Gets and sets the save format for the output. Generally, for specific process in low code way, only some specific formats are allowed. Please specify the correct format for corresponding process, otherwise unexpected result or even exception may be caused.

Examples

using System;
using System.IO;
using Aspose.Cells;
using Aspose.Cells.LowCode;

namespace AsposeCellsExamples
{
    public class LowCodeClassLowCodeSaveOptionsDemo
    {
        public static void Run()
        {
            // Create a new workbook
            Workbook workbook = new Workbook();
            
            // Add a worksheet and put some data
            Worksheet worksheet = workbook.Worksheets[0];
            worksheet.Cells["A1"].PutValue("Hello");
            worksheet.Cells["B1"].PutValue("World");

            // Create save options
            LowCodeSaveOptions saveOptions = new LowCodeSaveOptions()
            {
                OutputFile = "output.xlsx"
            };

            // Save the workbook using the specified options
            workbook.Save(saveOptions.OutputFile, saveOptions.SaveFormat);
            
            Console.WriteLine("File saved successfully with LowCodeSaveOptions");
        }
    }
}

See Also