Skip to main content
vicentg0001
July 14, 2022
Question

Read the first line of a CSV

  • July 14, 2022
  • 6 replies
  • 0 views

Does anyone know how to read the first line of a CSV?

I have tried the readcsvlogpaging() function but it only works for files that are in the logs directory, and the readexcelsheetpaging() function does not work for CSV documents.

Any ideas?

Thanks!

6 replies

mikes0011
Brainy
July 14, 2022

A CSV file is really just text (just in a particular format).  I think you might be able to leverage a rule that reads the contents of a text file - i'll look around and see if I remember the one I was thinking of.

The Expression Guru
vicentg0001
July 14, 2022

I have also tried the readtextfromfile() function but the file is very large and I get the following error: The Memory Circuit Breaker prevented this evaluation from completing due to insufficient resources. Is there any way to limit this reading?

mikes0011
Brainy
July 14, 2022

Oof -- How large is the CSV?  Where is it coming from, and do you have any alternatives?

The Expression Guru
abhayd3663
March 27, 2023

I am not aware of any way to read csv directly within the Appian. It has to be loaded into DB first and then retrieve from the same.