July 30, 2023

tFileOutputExcel – Docs for ESB 7.x

tFileOutputExcel

Writes an MS Excel file with separated data values according to a defined
schema.

tFileOutputExcel Standard properties

These properties are used to configure tFileOutputExcel running in the Standard
Job framework.

The Standard
tFileOutputExcel component belongs to the File family.

The component in this framework is available in all Talend
products
.

Basic settings

Write excel 2007 file format (xlsx /
xlsm)

Select this check box to write the processed
data into the .xlsx or .xlsm format of Excel
2007.

Use Output Stream

Select this check box process the data flow of
interest. Once you have selected it, the Output Stream field displays and you can type in
the data flow of interest.

The data flow to be processed must be added to
the flow in order for this component to fetch these data via the corresponding
representative variable.

This variable could be already pre-defined in
your Studio or provided by the context or the components you are using along
with this component; otherwise, you could define it manually and use it
according to the design of your Job, for example, using tJava or tJavaFlex.

In order to avoid the inconvenience of writing
manually, you could select the variable of interest from the auto-completion
list (Ctrl+Space) to fill
the current field on condition that this variable has been properly
defined.

For further information about how to use a
stream, see Reading data from a remote file in streaming mode.

File Name

Name or path to the output file.

This field becomes unavailable once you have
selected the Use Output
Stream
check box.

For further information about how to define and
use a variable in a Job, see
Talend Studio

User Guide.

Warning: Use absolute path (instead of relative path) for
this field to avoid possible errors.

Sheet name

Name of the xsl sheet.

Warning: If a subJob contains multiple tFileOutputExcel components that
write the same excel file (that is, the File
Name
options of these components point to the same file), these
components overwrite the same xsl sheet and only the data of the
tFileOutputExcel component that is the last one to write the excel file
remains. To avoid data lost, make sure that these tFileOutputExcel components
are in different subJobs.

Include header

Select this check box to include a header row
to the output file.

Append existing file

Select this check box to add the new lines at
the end of the file.

Append existing sheet:
Select this check box to add the new lines at the end of the Excel sheet.

Is absolute Y pos.

Select this check box to add information in
specified cells:

First cell X: cell
position on the X-axis (X-coordinate or Abcissa).

First cell Y: cell
position on the Y-axis (Y-coordinate).

Keep existing cell
format
: select this check box to retain the original layout and
format of the cell you want to write into.

Font

Select in the list the font you want to
use.

Define all columns auto
size

Select this check box if you want the size of
all your columns to be defined automatically. Otherwise, select the Auto size check boxes next to
the column names you want their size to be defined automatically.

Protect
file

Select this check box and enter the
password in the Password field to protect the file using
a password.

This component supports agile encryption.

This option is available when Write excel2007 file format(xlsx) is selected and
Use Output Stream is not selected.

Schema and Edit Schema

A schema is a row description, it defines the
number of fields to be processed and passed on to the next component. The
schema is either Built-in or stored remotely in the Repository.

This
component offers the advantage of the dynamic schema feature. This allows you to
retrieve unknown columns from source files or to copy batches of columns from a source
without mapping each column individually. For further information about dynamic schemas,
see
Talend Studio

User Guide.

This
dynamic schema feature is designed for the purpose of retrieving unknown columns of a
table and is recommended to be used for this purpose only; it is not recommended for the
use of creating tables.

Click Edit
schema
to make changes to the schema. If the current schema is of the Repository type, three options are available:

  • View schema: choose this
    option to view the schema only.

  • Change to built-in property:
    choose this option to change the schema to Built-in for local changes.

  • Update repository connection:
    choose this option to change the schema stored in the repository and decide whether
    to propagate the changes to all the Jobs upon completion. If you just want to
    propagate the changes to the current Job, you can select No upon completion and choose this schema metadata
    again in the Repository Content
    window.

 

Built-in: The schema
will be created and stored locally for this component only. Related topic: see

Talend Studio
User Guide
.

 

Repository: The schema
already exists and is stored in the Repository, hence can be reused in various
projects and Job designs. Related topic: see
Talend Studio
User Guide
.

Advanced settings

Create directory if not
exists

This check box is selected by default. This
option creates the directory that will hold the output files if it does not
already exist.

Custom the flush buffer
size

Available when Select this check box to write the processed data into
theWrite excel2007 file format (xlsx)
is selected in the
Basic settings
view.

Select this check box to set the maximum
number of rows in the Row
number
field that are allowed in the buffer.

Advanced separator (for
numbers)

Select this check box to modify the separators
you want to use for numbers:

Thousands separator:
define separators for thousands.

Decimal separator:
define separators for decimals.

Encoding

Select the encoding type from the list or
select Custom and
define it manually. This field is compulsory for DB data handling.

Don’t generate empty file Select the check box to avoid the generation of an empty
file.

Recalculate formula

Select this check box if you need to
recalculate formula(s) in the specified Excel file.

This check box appears only when you select
all these three check boxes: Write
excel2007 file format(xlsx)
, Append existing file, and Append existing sheet.

tStatCatcher Statistics

Select this check box to gather the Job
processing metadata at a Job level as well as at each component level.

Global Variables

Global Variables

NB_LINE: the number of rows read by an input component or
transferred to an output component. This is an After variable and it returns an
integer.

ERROR_MESSAGE: the error message generated by the
component when an error occurs. This is an After variable and it returns a string. This
variable functions only if the Die on error check box is
cleared, if the component has this check box.

A Flow variable functions during the execution of a component while an After variable
functions after the execution of the component.

To fill up a field or expression with a variable, press Ctrl +
Space
to access the variable list and choose the variable to use from it.

For further information about variables, see
Talend Studio

User Guide.

Usage

Usage rule

Use this component to write an MS Excel file
with data passed on from other components using a Row link.

Dynamic settings

Click the [+] button to add a row in the
table and fill the Code field with a context variable
to choose your HDFS connection dynamically from multiple connections planned in your
Job. This feature is useful when you need to access files in different HDFS systems or
different distributions, especially when you are working in an environment where you
cannot change your Job settings, for example, when your Job has to be deployed and
executed independent of
Talend Studio
.

The Dynamic settings table is
available only when the Use an existing
connection
check box is selected in the Basic settings view. Once a dynamic parameter is
defined, the Component List box in the
Basic settings view becomes unusable.

For examples on using dynamic parameters, see Reading data from databases through context-based dynamic connections and Reading data from different MySQL databases using dynamically loaded connection parameters. For more information on Dynamic
settings
and context variables, see Talend Studio
User Guide.

Limitation

Due to license incompatibility, one or more JARs required to use
this component are not provided. You can install the missing JARs for this particular
component by clicking the Install button
on the Component tab view. You can also
find out and add all missing JARs easily on the Modules tab in the
Integration
perspective of your studio. You can find more details about how to install external modules in
Talend Help Center (https://help.talend.com)
.

Related scenario

For tFileOutputExcel related scenario, see tSugarCRMInput (deprecated);

For scenario about the usage of Use Output Stream
check box, see Utilizing Output Stream to save filtered data to a local file.


Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x