web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Export

(0) ShareShare
ReportReport
Posted on by 4,824

Hi experts, I tried to create the export from xml port. It works, but how to export the data as the excel format as the default. I tried to change the format like this: Format: fixed text or Variable Text in the property, but has an error: 

An element with source type table cannot have tale elements children.

Please advise! Thank you!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Amol Salvi Profile Picture
    18,698 on at

    You can export data in csv or txt format and then you can open these file in excel

    You need to specify delimiters on xmlport like comma or TAB

  • Suggested answer
    Maneesha Profile Picture
    5,891 on at

    On your error message feel like you have done some encapsulations check your coding fort that

    If you go by another way try Amol's comment

    or you can directly write to the DB

  • Suggested answer
    Tharanga Chandrasekara Profile Picture
    23,118 on at

    Can you please post the screenshot of the XML port structure. It will help us to find the issue.

  • snoppy Profile Picture
    4,824 on at

    Hi experts,  one table in the XMPport is fine. It will export in text format. But I do not have luck with the two tables, and still has the error. I attached the screenshot. Please advise! Thank you!

    Stas.jpg

  • Suggested answer
    Amol Salvi Profile Picture
    18,698 on at

    For exporting from multiple tables I would suggest have a look at standard XMLPORT 5050 .

  • snoppy Profile Picture
    4,824 on at

    Thank you!

    5050 is not multiple tables
    1. The two tables are not linked tables and they are one
    2. There are no linked fields
    3. The second table is not indented

    If they are multiple tables, when the rest of the tables are indented, linked to the  previous tables and set up the format as the Variable Text, there will be errors.

    Thank you!

  • Suggested answer
    Suresh Kulla Profile Picture
    50,278 Super User 2026 Season 1 on at

    I don't think NAV will allow to export in Fixed or Variable format with Parent/Child Link you need to redesign your xmlport, using an integer or variables or temporary table.

  • Suggested answer
    Amol Salvi Profile Picture
    18,698 on at

    As Suresh suggested you need to use integer table ,define variables  and write a program to export the records

  • Suggested answer
    Yogesh Kulkarni_ Profile Picture
    1,762 on at

    Snoppy,

    Dont know whether it really helps you or not but please have a look on standard XMLPorts like "IC Dimension Import/Export" (ID - 11) or "Import / Export Workflow" (ID - 1501).

     

    -Yogesh Kulkarni
    Please verify, if you find answer helpful.

  • Suggested answer
    4BzSoftware Profile Picture
    6,073 on at

    Hi Snoppy,

    Is it something like this:

    1. Define XML port with <Xml> format:

    5618.2.png

    2. Open XML file with Excel:

    5618.2.png

    3. Object in Text format:

    OBJECT XMLport 5000 Test
    {
      OBJECT-PROPERTIES
      {
        Date=02/24/17;
        Time=[ 4:15:39 PM];
        Modified=Yes;
        Version List=;
      }
      PROPERTIES
      {
      }
      ELEMENTS
      {
        { [{3E4B8C1B-3003-4447-AD73-B852E9E8B013}];  ;Root                ;Element ;Text     }
    
        { [{153DDB48-A443-4392-B25C-10C22F6753F7}];1 ;SH                  ;Element ;Table   ;
                                                      SourceTable=Table36 }
    
        { [{C5B24BD1-95CB-4BD7-9AD2-F772BA07D830}];2 ;SH_DocNo            ;Element ;Field   ;
                                                      DataType=Code;
                                                      SourceField=Sales Header::No. }
    
        { [{9FE956CD-22AE-4BE1-BDB1-3A012DD51088}];2 ;SL                  ;Element ;Table   ;
                                                      SourceTable=Table37;
                                                      LinkFields=Field1=FIELD(Field1),
                                                                 Field3=FIELD(Field3);
                                                      LinkTable=Sales Header }
    
        { [{A0D13F29-1E9E-44AF-9F66-CA07FAE7D0C0}];3 ;SL_LineNo           ;Element ;Field   ;
                                                      DataType=Integer;
                                                      SourceField=Sales Line::Line No. }
    
        { [{5F8EF7EC-4194-4A88-86DB-7C771314DBB4}];1 ;SIH                 ;Element ;Table   ;
                                                      SourceTable=Table112 }
    
        { [{2449A811-9D15-4FBD-AAD3-AC69A6047E52}];2 ;SIH_DocNo           ;Element ;Field   ;
                                                      DataType=Code;
                                                      SourceField=Sales Invoice Header::No. }
    
        { [{5F3C371A-4ABD-4A4A-80B2-455579D8C2E4}];2 ;SIL                 ;Element ;Table   ;
                                                      SourceTable=Table113;
                                                      LinkFields=Field3=FIELD(Field3);
                                                      LinkTable=Sales Invoice Header }
    
        { [{07B68E0A-760B-4C12-A835-DE2AA7349EA3}];3 ;SIL_LineNo          ;Element ;Field   ;
                                                      DataType=Integer;
                                                      SourceField=Sales Invoice Line::Line No. }
    
      }
      EVENTS
      {
      }
      REQUESTPAGE
      {
        PROPERTIES
        {
        }
        CONTROLS
        {
        }
      }
      CODE
      {
    
        BEGIN
        END.
      }
    }
    


Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
TAHER_El_Mehdi Profile Picture

TAHER_El_Mehdi 2

#1
sliderxb Profile Picture

sliderxb 2

#1
broberts Profile Picture

broberts 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans