156
Views
4
Comments
[CSVUtil] Last line character error (EOL)
csvutil
Service icon
Forge asset by Wei Zhu

Hi Guys!

I came across this error / bug...

The first image shows the configuration and the second the incorrect content of the file.The text is correct.File contents without last characters.

Temporary solution AKA Gambiarra in Brazil:


Would anyone have a definitive solution ?

2023-02-10 19-42-59
João Melo
 
MVP

Hi Maurilio, It is not clear for what exactly you're trying to achieve here.

Is it your requirement to have a line break to the end of your file or not? In this you should indeed use NewLine() action, it's not a gambiarra.

Can you share your espace so we can take a look and help out?

2018-09-27 18-20-33
Swatantra Kumar
Champion

Wait! Is it not only EOL issue, but also incorrect data itself? 

What I read in 2nd image, the data itself is not complete.

2017-10-11 11-20-01
Maurilio Macedo

Exactly Swatantra ...

The last characters are deleted from the generated CSV file.

To avoid this I manually entered Chr (13) + NewLine () + NewLine ()

So the last characters remain in the file.


João, I will isolate this example and share OML here ... as soon as it replies here.


Regards...

2021-06-21 12-37-59
Wei Zhu

Hi Maurilio


 According to you images, the problem are there are 5 bytes missed.

 Though I can not see your oml, but there are following steps.

  Step1: Use CSVUtil to export CSV as Text

  Step2: Use TextToBinaryData to convert Text to Binary with utf-8 encode.

  Step3: Transfer Binary Data from server to your PC.

  Step4: Open CSV with your text editor


 According to your 1st image, Step1 should be OK, becuase CSVUtil return the correct text.

 And assuming Step4 is OK, because usually text editor should be work fine.


So the problem should between Step2 and Step3 that cause 5 bytes missed.

You'd better to check binary data of these two steps.


Regrads

Wei


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