Notifications
Announcements
No record found.
Hi,
During Excel import Empty lines from .csv file is reading.
For example in my case I have only 5 records in .csv but after running my x++ job it is processing 15 records i.e. 10 empty lines along with my 5 records. How to avoid these empty lines.
Hi mahiims18,
Could you please share the code you are using in the job?
container roles,readCon; counter icount,inserted; int recCount =0,fvalid=0; delete_from maCustUpdate; csvFile = new CommaIO(filename, 'r'); try { if (csvFile) { readCon = csvFile.read(); while (csvFile.status() == IO_Status::OK) { readCon = csvFile.read(); fvalid ; if(readCon) { icount ;
This was part of my code, I have almost 200 lines.
While reading the line number 10 is reading 10 lines at a time even though I have 5 records in my .csv file
What data do you try to import from a .csv file?
Can you share details about your job?
Many thanks,
Ludwig
Open the CSV in Notepad. Most likely you have empty lines in the end of the file. Remove them and try to import again.
Hi Ludwig,
from .csv file I have customer addresses to be updated.
Hi Nikolaos
when I can clear the content of empty lines in csv file it is working fine for me but I am wondering why my code is reading empty lines some times.
I assume it always reads empty lines if the file has empty lines.
You can check if the line has contents before writing anything to the database.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 611 Most Valuable Professional
André Arnaud de Cal... 529 Super User 2025 Season 2
Sohaib Cheema 285 User Group Leader