Skip to content

Cannot extract text from cells of tables with background colour #968

@BQSBQS

Description

@BQSBQS

For table with some cells with background colour, my code is unable to extract all the content. It prints '\n' for cell with background colour, and below is the output for cell._tc.xml

<w:tc xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:mo="http://schemas.microsoft.com/office/mac/office/2008/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mv="urn:schemas-microsoft-com:mac:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape">
  <w:tcPr>
    <w:tcW w:type="dxa" w:w="7606"/>
    <w:gridSpan w:val="5"/>
    <w:tcBorders>
      <w:bottom w:sz="8.0" w:val="single" w:color="#000000"/>
    </w:tcBorders>
    <w:shd w:fill="eceaec"/>
    <w:tcMar>
      <w:start w:w="0" w:type="dxa"/>
      <w:end w:w="0" w:type="dxa"/>
    </w:tcMar>
    <w:tcMar>
      <w:start w:w="0" w:type="dxa"/>
      <w:end w:w="0" w:type="dxa"/>
    </w:tcMar>
    <w:tcMar>
      <w:start w:w="0" w:type="dxa"/>
      <w:end w:w="0" w:type="dxa"/>
    </w:tcMar>
    <w:tcMar>
      <w:start w:w="0" w:type="dxa"/>
      <w:end w:w="0" w:type="dxa"/>
    </w:tcMar>
    <w:tcMar>
      <w:start w:w="0" w:type="dxa"/>
      <w:end w:w="0" w:type="dxa"/>
    </w:tcMar>
  </w:tcPr>
  <w:tbl>
    <w:tblPr>
      <w:tblW w:type="auto" w:w="0"/>
      <w:tblLayout w:type="fixed"/>
      <w:tblLook w:firstColumn="1" w:firstRow="1" w:lastColumn="0" w:lastRow="0" w:noHBand="0" w:noVBand="1" w:val="04A0"/>
      <w:tblInd w:w="3184.0" w:type="dxa"/>
    </w:tblPr>
    <w:tblGrid>
      <w:gridCol w:w="7606"/>
    </w:tblGrid>
    <w:tr>
      <w:trPr>
        <w:trHeight w:hRule="exact" w:val="434"/>
      </w:trPr>
      <w:tc>
        <w:tcPr>
          <w:tcW w:type="dxa" w:w="4422"/>
          <w:tcBorders/>
          <w:shd w:fill="dfe4ed"/>
          <w:tcMar>
            <w:start w:w="0" w:type="dxa"/>
            <w:end w:w="0" w:type="dxa"/>
          </w:tcMar>
        </w:tcPr>
        <w:p>
          <w:pPr>
            <w:autoSpaceDN w:val="0"/>
            <w:autoSpaceDE w:val="0"/>
            <w:widowControl/>
            <w:spacing w:line="180" w:lineRule="exact" w:before="80" w:after="0"/>
            <w:ind w:left="1956" w:right="1956" w:firstLine="0"/>
            <w:jc w:val="right"/>
          </w:pPr>
          <w:r>
            <w:rPr>
              <w:rFonts w:ascii="Gotham" w:hAnsi="Gotham" w:eastAsia="Gotham"/>
              <w:b/>
              <w:i w:val="0"/>
              <w:color w:val="000000"/>
              <w:sz w:val="16"/>
            </w:rPr>
            <w:t xml:space="preserve">2018 </w:t>
          </w:r>
          <w:r>
            <w:br/>
          </w:r>
          <w:r>
            <w:rPr>
              <w:rFonts w:ascii="Gotham" w:hAnsi="Gotham" w:eastAsia="Gotham"/>
              <w:b/>
              <w:i w:val="0"/>
              <w:color w:val="000000"/>
              <w:sz w:val="16"/>
            </w:rPr>
            <w:t>£’000</w:t>
          </w:r>
        </w:p>
      </w:tc>
    </w:tr>
  </w:tbl>
  <w:p/>
  <w:p>
    <w:pPr>
      <w:autoSpaceDN w:val="0"/>
      <w:autoSpaceDE w:val="0"/>
      <w:widowControl/>
      <w:spacing w:line="14" w:lineRule="exact" w:before="0" w:after="0"/>
      <w:ind w:left="0" w:right="0"/>
    </w:pPr>
  </w:p>
</w:tc>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions