Using String_Split on a BinaryDataToText.Text it creates empty rows.

I am trying to load a txt file , space delimited but an empty row gets created after very single record.

file data example :


My String_Split params: 


my function:


This is how I am avoiding the empty rows to be saved in the database, however I would like to know if there is an way to avoid having it in the loop.

Table with the empty rows:


Please let me know if anyone has any idea why it is happening and how to avoid it to happen.

PP-2022eC-cleaned1txt.txt

mvp_badge
MVP

Hi Raffael,

Sorry! I couldn't able to find the reason for the observed working, but I do have a workaround to suggest.

1) Using Replace() function, replace the NewLine() with a special character (e.g., ; (semicolon))

2) Split the replaced text using the String_Split server action, with a delimiter value --> the special character  (semicolon) used in step 1

Demo: ProcessTxtFile

I hope this helps you!


Kind regards,

Benjith Sam


Thank you @Benjith Sam  for your help, could I have access to your code? I would like to see how that upload functionality works too :)


Thank you

mvp_badge
MVP


You're welcome, Raffael :)

Refer to the attached oml file.


Kind regards,

Benjith Sam

NeoLab_ProcessTxtFile.oml

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.