Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Answered

Export to excel through batch process

Posted on by 2,985

When I try to do i am getting error when i tried to run in batch.

. System. NullReferenceException: Object reference not set to an instance of an object. at Dynamics. Ax.fim.spreadsheet .

error line "spreadSheet.InstantiateColumn(columnProperties);".help me out to go ahead with my process.

Reply

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Export to excel through batch process

    Thanks Kavitha but it has limitations so it is not meeting my requirement.

    Regards, Lalit Gupta

  • Suggested answer
    Pravasti AK Profile Picture
    Pravasti AK 2,985 on at
    RE: Export to excel through batch process

    Hi Lalit,

    Please follow the below link :

    http://sashanazarov.blogspot.com/2012/11/exporting-to-excel-with.html

    Thanks,

    Kavitha

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Export to excel through batch process

    Hi,

    Did anybody try to export in excel in batch because i am also facing the same issue as it is working fine interactively but not working in batch mode and saying that it can only be run on client. Also , sysexcel classes construct are set on client only so how it can run on batch mode.

    Please revert if anybody has done it or have any solution.

    Thanks & Regards,

    Lalit Gupta

  • Verified answer
    Pravasti AK Profile Picture
    Pravasti AK 2,985 on at
    RE: Export to excel through batch process

    Hi All,

    Filename is not passed properly ,and thats fixed the issue.

    Thanks,

    Kavitha.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Export to excel through batch process

    I tried that and didn't worked.

    So I did what I wrote in my post.

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Export to excel through batch process

    The excel class can not run in a batch process, you can use the IO framework and convert the csv file into a excel using a Dll.

    You will run one batch to create the csv file and a second batch to convert the cvs to a excel file (using dll).

    There is a lot of examples how to convert a csv file into a excel file using .NET (dll).

    Thanks!

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Export to excel through batch process

    Hi Kavitha Rajan

    The error occur when you try run the export by job ?

  • Pravasti AK Profile Picture
    Pravasti AK 2,985 on at
    RE: Export to excel through batch process

    Hi ludwig,

    From customized form i am pulling around 20 fields into excel.when i try to run as a job its working fine.I also tried using sysexcelapplication classes  it ended up with error in sysexcelapplication ::construct  ().Later i decided to use fim classes but it also ended up with error.

  • Ludwig Reinhard Profile Picture
    Ludwig Reinhard Microsoft Employee on at
    RE: Export to excel through batch process

    Hi,

    Where did you try this export? In which form/report?

    Best regards,

    Ludwig

Helpful resources

Quick Links

Can you answer this forum question?

You could make someone's day!

Community Newsletter - May 2024

Kudos to our community stars!

Community Spotlight of the Month

Kudos to Mohamed Amine Mahmoudi!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 283,663 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 224,750 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,146

Featured topics

Product updates

Dynamics 365 release plans