Help

input.fileAsync() - work on file before parsing it

Topic Labels: Scripting extentions
721 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Emar_Vegt
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi all.

With my custom CSV importer script, I’d like to do a few operations before the .parsedContents method should look at the file. Examples:

  • My file uses a comma for decimal notation. .parsedContents simply removes them, so 4,5 becomes 45 but it should become 4.5
  • I’d like to take a closer look at date formats used in the file, because they may vary, and even if .parsedContents correctly identifies it as a date, the format may be DD/MM/YYYY or MM/DD/YYYY.

The Javascript methods .readAsText() or .text don’t seem to work even though the documentation states that input.fileAsync() delivers a File object which is a Blob.

Any clues?

0 Replies 0