deleting 1st Row before inporting data from CSV file

brijleo
Member Posts: 70
Hi,
I am importing data form .csv file, but before importing data i have delete 1st row which contain header row automatically.
thank!
I am importing data form .csv file, but before importing data i have delete 1st row which contain header row automatically.
thank!
0
Comments
-
I suppose that you could use a counter and do a CurrDataport.SKIP but the problem is that all your headers are "TEXT" and you'll get errors when the field is of different type. I wouldn't do it if I were you, but if you really need it, declare Text Variables for all your columns and do a skip on the first row. Then you'll need to manually EVALUATE / VALIDATE the values in the record fields...0
-
Or you can use
CurrFile.READ(MyVariable);
In OnPreDataItem or OnPreDataport when mode is Import to skip the first line (it will read the line and the import will continue on next line). 8)0 -
kine wrote:Or you can use
CurrFile.READ(MyVariable);
In OnPreDataItem or OnPreDataport when mode is Import to skip the first line (it will read the line and the import will continue on next line). 8)Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Here's an explanation that I used from Tips N Trick Forum.
It allows you to skip the first line (or multiple lines if needed)
viewtopic.php?f=5&t=105640
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions