Hi,
I am using a dataport to import CSV file. The first line of the CSV file is having heading which I do not want to import .
How can we ignore the first line so that dataport does not give any error while importing because of the headings?
Regards,
0
Comments
1. Remove the heading from the csv file and import
2. Use a variable iCount that increases in the OnAfterImportRecord. When the iCount = 1 (first line) do CurrDataport.SKIP;
The second way I tried but it didn't worked. I declared an integer variable
wrote the code CurrDataport.skip on OnBeforeImport but it wont work.
It never reaches to the code.
rgds
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
http://www.BiloBeauty.com
http://www.autismspeaks.org
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
RIS Plus, LLC
That amazingly works. I appreciate that.
what is this code doing and how CHAR works.
How we will make it to work for 2 lines ?
Regards
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
In DOS/Windows, each end of line is finished with a CR/LF (carriage return/line feed) in ascii 13/10. So If I find the 10, I know that next char is a char of line 2 and stop reading.
And for 2 lines, you can just put an extra repeat-until. Otherwise you can use a counter.I'll put this code in the tip&tricks.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!