Hi experts,
I have a code to read CSV file using Comma text IO class. It works fine , however i am unable to figure out how can i customize it so that it skips reading last 2 rows of the CSV file.
Please share psuedo/full code.
Thanks
Mav
Hi experts,
I have a code to read CSV file using Comma text IO class. It works fine , however i am unable to figure out how can i customize it so that it skips reading last 2 rows of the CSV file.
Please share psuedo/full code.
Thanks
Mav
Hi Mav,
If you use newline as row delimiter, you can calculate the number of lines with TextBuffer before you start reading the file with CommaTextIO. In the while loop for CommaTextIO you can increment current line and compare it with the total number of lines.
TextBuffer textBuffer = new TextBuffer(); textBuffer.fromFile("my_file_path"); info(strFmt("%1", textBuffer.numLines()));
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,214 Most Valuable Professional
nmaenpaa 101,156