Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to read Excel attachment body in MS CRM.

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi

I need to read the data of the excel that is attached to the email attachment.The excel contains string values in the cells.

I can able to get the encoded value of the body of the attachment but not able to decode it. I need to get the string values present in the attached excel.

Any help would be appreciated.

*This post is locked for comments

  • Srinivas28 Profile Picture
    Srinivas28 5 on at
    RE: How to read Excel attachment body in MS CRM.

    Hi Sreekanth, facing the same issue, Can u pls give an answer to this.

  • dkrishna Profile Picture
    dkrishna 475 on at
    RE: How to read Excel attachment body in MS CRM.

    Hi sreekanth,

    Have you solved this problem? Can you pls share your solution?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to read Excel attachment body in MS CRM.

    Hi Nadeeja

    I have already used DocumentFormat.OpenXml dll and the code that is present in the link which you proposed, but that code is helpful to read the data in cells of the excel only if the data in the excel is Numeric.But I have to read the string data in the cells of excel which is Encoded in MS CRM.

  • Suggested answer
    Nadeeja Bomiriya Profile Picture
    Nadeeja Bomiriya 6,804 on at
    RE: How to read Excel attachment body in MS CRM.

    Hi Sreekanth2585,

    It is not straightforward to read values in Excel Cells programmatically.  You need third party DLLs.  Since you are in CRM Online, you'll need to use ILMerge to merge the DLLs to your assembly.

    Below is one of the ways to read Excel files.

    Open XML SDK - msdn.microsoft.com/.../gg575571.aspx

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to read Excel attachment body in MS CRM.

    Refer this:

    parthimscrm.wordpress.com/.../comment-page-1

  • Suggested answer
    Nithya Gopinath Profile Picture
    Nithya Gopinath 17,076 on at
    RE: How to read Excel attachment body in MS CRM.

    Hi Sreekanth,

    Refer the link below.

    msdn.microsoft.com/.../gg328344.aspx

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to read Excel attachment body in MS CRM.

    Hi Felippe

    I have already got the body of the attachment and it is in encoded state.

    Using spreadsheetdocument class i can able to get the numeric values in the Excel but not the string values.

    Any suggestion to decode the body of the excel which is in base64 format and read the string values in the excel?

  • Felippe Profile Picture
    Felippe 796 on at
    RE: How to read Excel attachment body in MS CRM.

    Have u already tried get the stream of "documentbody" field from Annotation and read this stream with  a Excel lib , like SpreadSheetDocument or another?

    Best Regards,

    If this helps, please "Like"

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,321 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans