1. Home
  2. Temporary: add bean

Temporary: add bean

Important

this page is being merged with page https://doc.iterop.com/wp-admin/post.php?post=3429&action=edit

getFileContentAsText(file_variableId, false)

Information

getFileContentAsText (file_variableId, false,” UTF-8″) has the same behavior with the choice of charset in addition.

Returns the contents of a flat file as a string. If the file is not found or does not exist, a string with the value “An error occurred during file transformation. There is no attachment for this ID:” will be returned.

Parameters :

file_variableId : The id of the file to be recovered.

boolean_throwIteropErrorIfFailure : If an error occurs during the execution of the method, possibility to continue the process normally (false to boolean) or to stop it to process the error manually (true).

Returns: The contents of the file as a string.

${files.getFileContentAsText(file_variableId, boolean_throwIteropErrorIfFailure)}

Or with the choice of chariots:

${files.getFileContentAsText(file_variableId, boolean_throwIteropErrorIfFailure, "Charset (UTF-8, ISO-8859-1, ...)")}
Result: Returns in ficContent the contents of the file whose id is “file_variableId“.

newExcelFile(execution, “filename.xlsx”, “file_targetvariableId”)

Create an empty Excel file and return its id.

Parameters :

  • as is.>
  • File_Name.xlsx : Name of the file that will be created. Put in quotation marks
  • file_targetvariableId: The ID of the variable receiving the new file. Put it in quotes.

Back to: The id of the new Excel file.

${excel.newExcelFile(execution, "filename.xlsx", "file_targetvariableId")}
Create a new Excel file named “NewExcelDoc” and place the file id in ExcelDocId

newWordFile(execution, “filename.docx”, “file_targetvariableId”)

Create an empty Word file and return its id.

Parameters :

  • execution : Leave as is
  • File_Name.xlsx : Name of the file that will be created. Put in quotation marks
  • file_targetvariableId: The ID of the variable receiving the new file. Put it in quotes.

Background: The id of the new Word file.

${word.newWordFile(execution, "filename.docx", "file_targetvariableId")}
Create a new Word file named “NewWordDoc” and place the file id in WordDocId

Updated on 7 September 2022

Was this article helpful?

Need Support?
Can't find the answer you're looking for?
Contact Support