Options

Dataport Import csv file

IvonaKIvonaK Member Posts: 114
edited 2016-02-01 in NAV Three Tier
Hi to all,

I have to make a Dataport for import a csv file(The scv file have coma delimiter and file format is variable). I have csv file like this picture. I need just the last 10 fields.

How I can skip the first row, and the first 13 fileds of each row?

Any advice,
Thanks a lot,
Ivona Kuzmanovska,

Answers

  • Options
    neilgfneilgf Member Posts: 148
    Hi

    Skipping the first line is easy using something like 'IF PostingDate='Posting Date' THEN CurrDataport.SKIP; // ignore first line if titles.'
    In terms of your csv file structure and ignoring some column headings it would be easier to load in csv data into global variables and then including some code in OnAfterImportRecord'.
    Hope this helps.
    Neil
  • Options
    IvonaKIvonaK Member Posts: 114
    Ok.

    Thanks a lot. I resolve :smile:

    Best Regards,
  • Options
    Wisa123Wisa123 Member Posts: 308
    For "ignoring" columns i usually just include some Dummy-Columns I dont use after they are filled. Faster to do so and you have to read the whole file anyway.
    Austrian NAV/BC Dev
  • Options
    IvonaKIvonaK Member Posts: 114
    Thanks :smile:
    Best Regards,
Sign In or Register to comment.