XMLPorts - CSV / Fixed Width Files

Jonathan2708Jonathan2708 Member Posts: 552
Hi,

I've found that Dataports are not supported under the Nav Application Server and so am investigating XMLPorts. My question is can XMLPorts be used to import CSV/Fixed Width files? I notice there is a Format property which has Xml/Variable/Fixed options. If it is possible are there tips on how to structure the Elements. Ideally I'd like to load the fields into variables.

Any help appreciated,

Jonathan

Comments

  • cernstcernst Member Posts: 280
    You can run a codeunit through Nav Application Server that launch a dataport . I don't think you can read csv with XML ports.
    _____________________
    NAV Freelance Consultant
  • Jonathan2708Jonathan2708 Member Posts: 552
    No I've found Dataports do not run at all under Application Server, whether they are called from Codeunits or Reports.

    So far with XMLPorts I've only been able to output text in XML format, even when the 'Format' property is set to 'Variable'.
  • cernstcernst Member Posts: 280
    Sorry my misstake thougt I'd done this before but I hadn't.
    I think the best way is to develop a codeunit that parse the csv file. If you want to do this flexible then you can also use a table to define the fileds this way you can import different types of csv files in one codeunit. I've parsed csv files with codeunits and it works fine think that there are some posts here how to do this as well.
    _____________________
    NAV Freelance Consultant
Sign In or Register to comment.