blob: 6c9c748b423f52f03048fbb1530ba91c99a266d8 [file] [log] [blame]
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"></meta><title>ConvertExcelToCSVProcessor</title><link rel="stylesheet" href="../../../../../css/component-usage.css" type="text/css"></link></head><script type="text/javascript">window.onload = function(){if(self==top) { document.getElementById('nameHeader').style.display = "inherit"; } }</script><body><h1 id="nameHeader" style="display: none;">ConvertExcelToCSVProcessor</h1><h2>Description: </h2><p>Consumes a Microsoft Excel document and converts each worksheet to csv. Each sheet from the incoming Excel document will generate a new Flowfile that will be output from this processor. Each output Flowfile's contents will be formatted as a csv file where the each row from the excel sheet is output as a newline in the csv file. This processor is currently only capable of processing .xlsx (XSSF 2007 OOXML file format) Excel documents and not older .xls (HSSF '97(-2007) file format) documents. This processor also expects well formatted CSV content and will not escape cell's containing invalid content such as newlines or additional commas.</p><p><a href="additionalDetails.html">Additional Details...</a></p><h3>Tags: </h3><p>excel, csv, poi</p><h3>Properties: </h3><p>In the list below, the names of required properties appear in <strong>bold</strong>. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the <a href="../../../../../html/expression-language-guide.html">NiFi Expression Language</a>.</p><table id="properties"><tr><th>Display Name</th><th>API Name</th><th>Default Value</th><th>Allowable Values</th><th>Description</th></tr><tr><td id="name">Sheets to Extract</td><td>extract-sheets</td><td></td><td id="allowable-values"></td><td id="description">Comma separated list of Excel document sheet names that should be extracted from the excel document. If this property is left blank then all of the sheets will be extracted from the Excel document. The list of names is case in-sensitive. Any sheets not specified in this value will be ignored.<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr><tr><td id="name"><strong>Number of Rows to Skip</strong></td><td>excel-extract-first-row</td><td id="default-value">0</td><td id="allowable-values"></td><td id="description">The row number of the first row to start processing.Use this to skip over rows of data at the top of your worksheet that are not part of the dataset.Empty rows of data anywhere in the spreadsheet will always be skipped, no matter what this value is set to.<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr><tr><td id="name">Columns To Skip</td><td>excel-extract-column-to-skip</td><td></td><td id="allowable-values"></td><td id="description">Comma delimited list of column numbers to skip. Use the columns number and not the letter designation. Use this to skip over columns anywhere in your worksheet that you don't want extracted as part of the record.<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr><tr><td id="name"><strong>Format Cell Values</strong></td><td>excel-format-values</td><td id="default-value">false</td><td id="allowable-values"><ul><li>true</li><li>false</li></ul></td><td id="description">Should the cell values be written to CSV using the formatting applied in Excel, or should they be printed as raw values.</td></tr><tr><td id="name"><strong>CSV Format</strong></td><td>CSV Format</td><td id="default-value">Custom Format</td><td id="allowable-values"><ul><li>Custom Format <img src="../../../../../html/images/iconInfo.png" alt="The format of the CSV is configured by using the properties of this Controller Service, such as Value Separator" title="The format of the CSV is configured by using the properties of this Controller Service, such as Value Separator"></img></li><li>RFC 4180 <img src="../../../../../html/images/iconInfo.png" alt="CSV data follows the RFC 4180 Specification defined at https://tools.ietf.org/html/rfc4180" title="CSV data follows the RFC 4180 Specification defined at https://tools.ietf.org/html/rfc4180"></img></li><li>Microsoft Excel <img src="../../../../../html/images/iconInfo.png" alt="CSV data follows the format used by Microsoft Excel" title="CSV data follows the format used by Microsoft Excel"></img></li><li>Tab-Delimited <img src="../../../../../html/images/iconInfo.png" alt="CSV data is Tab-Delimited instead of Comma Delimited" title="CSV data is Tab-Delimited instead of Comma Delimited"></img></li><li>MySQL Format <img src="../../../../../html/images/iconInfo.png" alt="CSV data follows the format used by MySQL" title="CSV data follows the format used by MySQL"></img></li><li>Informix Unload <img src="../../../../../html/images/iconInfo.png" alt="The format used by Informix when issuing the UNLOAD TO file_name command" title="The format used by Informix when issuing the UNLOAD TO file_name command"></img></li><li>Informix Unload Escape Disabled <img src="../../../../../html/images/iconInfo.png" alt="The format used by Informix when issuing the UNLOAD TO file_name command with escaping disabled" title="The format used by Informix when issuing the UNLOAD TO file_name command with escaping disabled"></img></li></ul></td><td id="description">Specifies which "format" the CSV data is in, or specifies if custom formatting should be used.</td></tr><tr><td id="name"><strong>Value Separator</strong></td><td>Value Separator</td><td id="default-value">,</td><td id="allowable-values"></td><td id="description">The character that is used to separate values/fields in a CSV Record. If the property has been specified via Expression Language but the expression gets evaluated to an invalid Value Separator at runtime, then it will be skipped and the default Value Separator will be used.<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong><br/><br/><strong>This Property is only considered if </strong><strong>the [CSV Format] Property has a value of "Custom Format".</strong></td></tr><tr><td id="name"><strong>Include Header Line</strong></td><td>Include Header Line</td><td id="default-value">true</td><td id="allowable-values"><ul><li>true</li><li>false</li></ul></td><td id="description">Specifies whether or not the CSV column names should be written out as the first line.</td></tr><tr><td id="name"><strong>Quote Character</strong></td><td>Quote Character</td><td id="default-value">"</td><td id="allowable-values"></td><td id="description">The character that is used to quote values so that escape characters do not have to be used. If the property has been specified via Expression Language but the expression gets evaluated to an invalid Quote Character at runtime, then it will be skipped and the default Quote Character will be used.<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong><br/><br/><strong>This Property is only considered if </strong><strong>the [CSV Format] Property has a value of "Custom Format".</strong></td></tr><tr><td id="name"><strong>Escape Character</strong></td><td>Escape Character</td><td id="default-value">\</td><td id="allowable-values"></td><td id="description">The character that is used to escape characters that would otherwise have a specific meaning to the CSV Parser. If the property has been specified via Expression Language but the expression gets evaluated to an invalid Escape Character at runtime, then it will be skipped and the default Escape Character will be used. Setting it to an empty string means no escape character should be used.<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong><br/><br/><strong>This Property is only considered if </strong><strong>the [CSV Format] Property has a value of "Custom Format".</strong></td></tr><tr><td id="name">Comment Marker</td><td>Comment Marker</td><td></td><td id="allowable-values"></td><td id="description">The character that is used to denote the start of a comment. Any line that begins with this comment will be ignored.<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong><br/><br/><strong>This Property is only considered if </strong><strong>the [CSV Format] Property has a value of "Custom Format".</strong></td></tr><tr><td id="name">Null String</td><td>Null String</td><td></td><td id="allowable-values"></td><td id="description">Specifies a String that, if present as a value in the CSV, should be considered a null field instead of using the literal value.<br/><br/><strong>This Property is only considered if </strong><strong>the [CSV Format] Property has a value of "Custom Format".</strong></td></tr><tr><td id="name"><strong>Trim Fields</strong></td><td>Trim Fields</td><td id="default-value">true</td><td id="allowable-values"><ul><li>true</li><li>false</li></ul></td><td id="description">Whether or not white space should be removed from the beginning and end of fields<br/><br/><strong>This Property is only considered if </strong><strong>the [CSV Format] Property has a value of "Custom Format".</strong></td></tr><tr><td id="name"><strong>Quote Mode</strong></td><td>Quote Mode</td><td id="default-value">Do Not Quote Values</td><td id="allowable-values"><ul><li>Quote All Values <img src="../../../../../html/images/iconInfo.png" alt="All values will be quoted using the configured quote character." title="All values will be quoted using the configured quote character."></img></li><li>Quote Minimal <img src="../../../../../html/images/iconInfo.png" alt="Values will be quoted only if they are contain special characters such as newline characters or field separators." title="Values will be quoted only if they are contain special characters such as newline characters or field separators."></img></li><li>Quote Non-Numeric Values <img src="../../../../../html/images/iconInfo.png" alt="Values will be quoted unless the value is a number." title="Values will be quoted unless the value is a number."></img></li><li>Do Not Quote Values <img src="../../../../../html/images/iconInfo.png" alt="Values will not be quoted. Instead, all special characters will be escaped using the configured escape character." title="Values will not be quoted. Instead, all special characters will be escaped using the configured escape character."></img></li></ul></td><td id="description">Specifies how fields should be quoted when they are written<br/><br/><strong>This Property is only considered if </strong><strong>the [CSV Format] Property has a value of "Custom Format".</strong></td></tr><tr><td id="name"><strong>Record Separator</strong></td><td>Record Separator</td><td id="default-value">\n</td><td id="allowable-values"></td><td id="description">Specifies the characters to use in order to separate CSV Records<br/><br/><strong>This Property is only considered if </strong><strong>the [CSV Format] Property has a value of "Custom Format".</strong></td></tr><tr><td id="name"><strong>Include Trailing Delimiter</strong></td><td>Include Trailing Delimiter</td><td id="default-value">false</td><td id="allowable-values"><ul><li>true</li><li>false</li></ul></td><td id="description">If true, a trailing delimiter will be added to each CSV Record that is written. If false, the trailing delimiter will be omitted.<br/><br/><strong>This Property is only considered if </strong><strong>the [CSV Format] Property has a value of "Custom Format".</strong></td></tr></table><h3>Relationships: </h3><table id="relationships"><tr><th>Name</th><th>Description</th></tr><tr><td>success</td><td>Excel data converted to csv</td></tr><tr><td>failure</td><td>Failed to parse the Excel document</td></tr><tr><td>original</td><td>Original Excel document received by this processor</td></tr></table><h3>Reads Attributes: </h3>None specified.<h3>Writes Attributes: </h3><table id="writes-attributes"><tr><th>Name</th><th>Description</th></tr><tr><td>sheetname</td><td>The name of the Excel sheet that this particular row of data came from in the Excel document</td></tr><tr><td>numrows</td><td>The number of rows in this Excel Sheet</td></tr><tr><td>sourcefilename</td><td>The name of the Excel document file that this data originated from</td></tr><tr><td>convertexceltocsvprocessor.error</td><td>Error message that was encountered on a per Excel sheet basis. This attribute is only populated if an error was occured while processing the particular sheet. Having the error present at the sheet level will allow for the end user to better understand what syntax errors in their excel doc on a larger scale caused the error.</td></tr></table><h3>State management: </h3>This component does not store state.<h3>Restricted: </h3>This component is not restricted.<h3>System Resource Considerations:</h3>None specified.</body></html>