Read Excel file using OpenXML by Columnwise RRS feed

  • Question

  • hi all,

    I  m having miss matched counts of columns in my excel EX: my excel file header row contains 10 columns and forecoming 5 rows having same 10 columns but the next row contains 12 columns .

    So I feel better if I can read excel columnwise ,so plase help me to resolve this problem.

    Thanks in advance


    Thursday, September 4, 2014 1:58 PM

All replies

  • Hi,

    Based on the description, you want to read the data by column. As far as I know, when we read the cell value using Open XML, we need to find the data by row first, then we can read the data by column. Because the data store in XML is like below, the row element is only child in the sheetdata element:

    <?xml version="1.0" encoding="UTF-8" ?> 
    <worksheet xmlns="">
            <row r="1">
                <c r="A1">

    You can get more detail about Open XML developing from link below:

    How to: Insert text into a cell in a spreadsheet document (Open XML SDK)

    Spreadsheets (Open XML SDK)

    Understanding the Open XML file formats

    Best regards


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, September 5, 2014 7:48 AM