Hi All,
I'm using Navision 3.70 and I have a requirement to import data from a .csv file in to General Journal. The.CSV file includes the fields Posting Date, Doc. No., G/L Acc type, Acc No. and Amount.
I created a table to define the format of the .CSV file because the order of fields in .CSV file are different from one file to other.
By using a Report,now I need to import data from .csv file in to General Journal.
Can any of you please help me, how can I create a Report in order to import the data.
Thanks in advance.
With Regards,
Dilla
0
Comments
Can I ask why You want to use Report for this import (instead of Dataport)?
Create One dataport per one file format is not good solution?
Thanks to all of you for your valuable inputs.
As per the requirement I should use only Report, I created a new Report and by using Excel Buffer Table some how I mangaged to import the data from .CSV file in to General Journal. .CSV file contains data for 21 fields for each record in a single shell seperated by ";".
Two problems I have now are:
1. If I have 2 records in .CSV file, first record is getting imported first and then it is over written by the second record.
2. If .CSV file does not contain data for all 21 fileds, emty fields are seperated by a ";" and I'm receiving an error message. How can I handle the empty fields.
Kindly revert for further information
Dynamics NAV Developer since 2005
The requirement is to get the data into NAV and use a method that still works in NAV 2009 from what I understand. The requirement is NOT to use a report to get the data. You could just as easily use a codeunit or a dataport. Functionality is a requirement; how you build that functionality usually is not.
Why are you using the Excel Buffer table? You're writing dataport functionality from scratch so you should have File Streams and be checking for delimiters in your code.