Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

xls2csv task is designed to provide insrument to convert xls, xlsm or xlsx files to csv files inside within IWS solutions.

xls2csv conversion solution consists of two elements: Java executable jar file (which performs actual translation) and streaming task adapter (which provides an interface to interact with jar file and set execution parameters).

Java executable jar file works with Java 6 and laternewer.

Deployment

xls2csv is provided for deployment as workflow MC package which can be installed through MCE and contain Message Center Editor and contains the task itself and the jar file which performs actual translation.

To deploy xls2csv solution on the box open MCE,:

      1. Open MCE and go to Message Center Streams tab

      2. Press Right Mouse Button in -click Message Center Streams tab

...

    4. Choose xls2csv_dplmt_wrf_main.pkg file in xls2csv_dplmt_wrf folder you want to import. Choose Click Next after. Agree to rewrite existing files. Agree with appeared WarningDismiss the Warning pop-up.

    5. Press Next twice, wait for data upload to finish and press Create Streams button.

Using

...

Adapter Task

To add a xls2csv adapter to your solution, please follow this these steps:

  1. Drag and drop translator activity on your solution canvas:
  2. Double-click on the new translator task and choose Existing To to make your search faster – use search window in upper right corner of a the tab.
  3. Add a proper data artifact (if it’s external of inner data artifact of solution) and create a connection to xls2csv adapter. Task The task will use incoming file as a source for translation and provide result file(s) as its outgoing tasks.
  4. Set launch options if needed. (See Launch Options chapter below)
Info
Note: Do not make or save any changes in xls2csv task.

...

Info
Note: you are free to rename task in your solution after creation if needed. Source of the task must be unchanged.

Anchor
LaunchOptions
LaunchOptions
Launch Options

Translation Using translation launch options allows the user to can modify the way converter performs file translation. Set CustomCMParams in task properties to specify translation properties.


Info

By default outgoing file name will contain source file name without extension in the beginning, outgoing file will contain data from all sheets of the

...

source file merged one after another from 1st sheet to last, outgoing file

...

will have comma as a delimiter

...

...

The following launch options are available (options are case sensitive!):

delimiter

allows Allows to set delimiter that will be used in result.

Note: due Due to some symbol restrictions the user must use comma  parameter  parameter value to explicitly set comma (“,”) as a delimiter in the outgoing file (also comma is default option), pipe if wants to  to set pipe (“|”) delimiter and or tabif wants to  to set tabulation (“\t”) delimiter. Other delimiter options does do not have any special translation, feel free to use them as they are meant to be, but consider escaping please avoid using special characters appropriate way for in workflow syntax.

encoding

Allows to set encoding that will to be used in result file(s).

...

Allows to set specific date format. Date format is MM/dd/yyyy by default.

Converter process processes date format by Java rules so MM stands for months, dd – for days, yyyy – for years (where mm stands for minutes, DD – days from the beginning of the year and YYYY – week year). But task adapter performs proper pre-conversion before passing parameters to jar converter so even if the user enters mm-dd-yyyy or YYYYMMDD, it will be converted to proper MM-dd-yyyy and yyyyMMdd correspondingly.

filenameToken

Allows to set the token that will be used in the result file name.

mergeSheets

mergeSheets flag allows Allows to switch off sheets merge or explicitly specify that sheets must be merged in one file (sheets are merged by default). Use “Y” ot or “true” in any case to explicitly enable merge, use any other value to switch merge off.

Note: if If merge is disabled every sheet will be translated to a separate file with the token in its name. In case option sheetsByName or no sheetsBy… sheetsBy was chosen – Sheet , sheet name will be used as token. In case if option sheetsByNumber is enabled – Sheet , sheet number will be used as token.

password

password option allows Allows to set password which must be is used to access protected source files. Ecsape To translate “!” as symbol please use “u+0021”

saveSourceName

saveSourceName by default is on, if needed to be switched off – use any value but “Y”enabled, set to "N" to switch off.

sheetsByName

sheetsByName option allows Allows to choose which sheet(s) from source must be processed. For multiple sheet names use “?” delimiter as follows Sheet1?Sheet2?Sheet3.

If the sheet name contain contains special characters and mergeSheets option is off, consider using option sheetsByNumber to escape avoid any issues regarding with creating result file with sheet name token (some special characters are allowed in sheet name but can not be used as part of file name).

Note: if If sheet name is specified but sheet with such name does is not present in the source file , no exception will be thrown.

sheetsByNumber

sheetsByNumber option allows Allows to choose which sheet(s) from source must be processed. For multiple sheet use comma delimiter as follows 2,3,5. Sheets counter numeration starts from 1. Note that if sheet number is specified, but there is no such sheet number presents present in the source file – no exception will be thrown.

newLineInCell

newLineInCell allows Allows to set character(s) that will be used as replacement for new line and carriage return if they are present in cell data.

 “~” is default replacement.

...