Dataport Import csv file

IvonaK
IvonaK Member Posts: 115
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

  • neilgf
    neilgf 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
  • IvonaK
    IvonaK Member Posts: 115
    Ok.

    Thanks a lot. I resolve :smile:

    Best Regards,
  • Wisa123
    Wisa123 Member Posts: 309
    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
  • IvonaK
    IvonaK Member Posts: 115
    Thanks :smile:
    Best Regards,