Show / Hide Table of Contents

    Text File Exporter

    Functions to export data to text files of various formats.

    Object Definition

    Object TypeCodeunit
    Object ID70327094
    Object NameQWETB Text File Exporter

    Procedures

    Name Description
    Date2Text(Record "QWETB File Settings"; Date): Text[2048] Formats a date value as text, according to the provided settings.
    Decimal2Text(Record "QWETB File Settings"; Decimal): Text[2048] Formats a decimal value as text, according to the provided settings.
    SaveDataToBlob(Code[20]; Record "QWETB Text Buffer" temporary; Codeunit "QWETB Temp Blob") Saves the provided data in a TempBlob.
    SaveDataToBlob(Code[20]; Record "QWETB Text Buffer" temporary; Codeunit "Temp Blob") Saves the provided data in a TempBlob.
    SaveDataToBlob(Record "QWETB File Settings" temporary; Record "QWETB Text Buffer" temporary; Codeunit "QWETB Temp Blob") Saves the provided data in a TempBlob.
    SaveDataToBlob(Record "QWETB File Settings" temporary; Record "QWETB Text Buffer" temporary; Codeunit "Temp Blob") Saves the provided data in a TempBlob.
    SaveDataToBlob(Record "QWETB File Settings" temporary; Record "QWETB Text Buffer" temporary; Record "QWETB Fixed Width Column" temporary; Codeunit "QWETB Temp Blob") Saves the provided data in a TempBlob.
    SaveDataToBlob(Record "QWETB File Settings" temporary; Record "QWETB Text Buffer" temporary; Record "QWETB Fixed Width Column" temporary; Codeunit "Temp Blob") Saves the provided data in a TempBlob.

    Deprecated Procedures

    Name Description
    SaveDataToBlob(Code[20]; Record "QWETB Text Buffer" temporary; Record "QWETB tTempBlob" temporary) Saves the provided data in a TempBlob record.
    SaveDataToBlob(Record "QWETB File Settings" temporary; Record "QWETB Text Buffer" temporary; Record "QWETB Fixed Width Column" temporary; Record "QWETB tTempBlob" temporary) Saves the provided data in a TempBlob.
    SaveDataToBlob(Record "QWETB File Settings" temporary; Record "QWETB Text Buffer" temporary; Record "QWETB tTempBlob" temporary) Saves the provided data in a TempBlob.

    Example

    // Configure settings
    TempFileSettings.Encoding := TempFileSettings.Encoding::UTF8;
    TempFileSettings."Data Type" := TempFileSettings."Data Type"::Delimited;
    TempFileSettings.Delimiter := TempFileSettings.Delimiter::Tab;
    
    // Populate the TextBuffer with the data to export
    TempTextBuffer.SetFieldValue(TempFileSettings, 1, 1, 'First Text Value');
    TempTextBuffer.SetFieldValue(TempFileSettings, 1, 2, 1231003.54);
    TempTextBuffer.SetFieldValue(TempFileSettings, 1, 3, 20221126D);
    TempTextBuffer.SetFieldValue(TempFileSettings, 2, 1, 'Second; ,Text;, "Value",');
    TempTextBuffer.SetFieldValue(TempFileSettings, 2, 2, 0.14);
    TempTextBuffer.SetFieldValue(TempFileSettings, 2, 3, 0D);
    TempTextBuffer.SetFieldValue(TempFileSettings, 3, 1, 'Third ,Text "Value"');
    TempTextBuffer.SetFieldValue(TempFileSettings, 3, 2, 0.0);
    TempTextBuffer.SetFieldValue(TempFileSettings, 3, 3, 20221126D);
    
    // Export the data to a TempBlob
    TextFileExporter.SaveDataToBlob(TempFileSettings, TempTextBufferExport, TempBlob);
    

    This documentation is generated from Smart Toolbox v27.0

    Back to top Copyright © 2020 SmartApps
    Generated by DocFX