locked
Convert xlsx file to csv format using BizTalk RRS feed

  • Question

  • Hello,

    Need to convert an excel (xlsx) file into a csv format. Could u please suggest the best way to do using BTS ?

    Monday, December 14, 2015 4:58 PM

Answers

  • Hi,

    Thank you for posting in MSDN forum.

    You need to do the following steps:

    1. Analyse and understand the Incoming excel file
    2. Define your xml schema depending on data in excel file
    3. Then try to parse the excel file and converting it to xml matching your xml schmea using one of open sources  like ExtremeML, Microsoft Excel Object Library, epplus and NPOI using console
    4. Then move your code to receive pipeline custom component
    5. For csv, it is a simple delimited flat file so you can use flat file assembler.

    There are some excel custom pipeline you can find them in this link but I didn't try them

    BizTalk: List of Custom Pipeline Components

    Please refer below related threads for more reference,

    how to convert xlsx to csv In biztalk

    Thanks,

    If my reply is helpful please mark as Answer or vote as Helpful.

    My blog | Twitter | LinkedIn

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    • Proposed as answer by Angie Xu Thursday, December 24, 2015 11:16 AM
    • Marked as answer by Angie Xu Thursday, December 24, 2015 11:16 AM
    Monday, December 14, 2015 5:49 PM
    Moderator

All replies

  • Hi,

    Thank you for posting in MSDN forum.

    You need to do the following steps:

    1. Analyse and understand the Incoming excel file
    2. Define your xml schema depending on data in excel file
    3. Then try to parse the excel file and converting it to xml matching your xml schmea using one of open sources  like ExtremeML, Microsoft Excel Object Library, epplus and NPOI using console
    4. Then move your code to receive pipeline custom component
    5. For csv, it is a simple delimited flat file so you can use flat file assembler.

    There are some excel custom pipeline you can find them in this link but I didn't try them

    BizTalk: List of Custom Pipeline Components

    Please refer below related threads for more reference,

    how to convert xlsx to csv In biztalk

    Thanks,

    If my reply is helpful please mark as Answer or vote as Helpful.

    My blog | Twitter | LinkedIn

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    • Proposed as answer by Angie Xu Thursday, December 24, 2015 11:16 AM
    • Marked as answer by Angie Xu Thursday, December 24, 2015 11:16 AM
    Monday, December 14, 2015 5:49 PM
    Moderator
  • Hi,

     Create a C# application and schedule it so that it can covert the XLS file to CSV and put it in the BizTalk Location folder. The link below explains the code how to convert XLS file to CSV. You can alternately build a sequential convoy where BizTalk will pick up the XLS file and when the orchestration starts you can call the C# assembly within the Orchestration and dump the file again in the folder where the same orchestration instance would pick up the converted CSV file.

     How to Convert XLS File into CSV File 

    Thanks

    Abhishek


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply

    Tuesday, December 15, 2015 3:37 AM
  • Excel has a "Save As" to CSV format. Why bring BTS into it?

    Regards.

    Tuesday, December 15, 2015 1:18 PM
  • You can do using custom pipeline component.

    Please use below link to convert.

    https://virendrabts.wordpress.com/2011/12/14/excel-receive-pipeline-component-for-biztalk-2010/

    Wednesday, December 16, 2015 7:59 PM
  • Hi,

    If you are using file based send port, please try by specifying .csv extension in the file name property.

    Regards,

    SathyaPrakash

    Thursday, December 17, 2015 6:59 AM