Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-16800

Excel 2016 xlsm and xlsx files - xlsm file drops last column when iterating through rows,cols

    XMLWordPrintable

Details

    Description

      Having the same file, one an xlsm and one a copy but an xlsx file.
      The last cell in the xlsm file is not seen in the object row or in object cell.

      However in the xlsx version of the same file, all cells in all row are seen.

      with open(rtp_outFilePath, mode='wt', newline='', errors='replace' ) as fh:
          fhOutCSV = csv.writer(fh, quoting=K_Quoting, delimiter=K_DelimiterChar)
          for row in ws.rows:
              iRowCnt += 1
              iCellCnt = 0
              aOfCell = [];
              for cell in row:
                  iCellCnt += 1
                  if(cell.value is None):
                      sData = ''
                  else:
                      sData = str(cell.value)
                      sData = re.sub(regX_Zapper,'?',sData)
      
                  aOfCell.append(sData)
              fhOutCSV.writerow(aOfCell)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            d7748a6178da jcoughlin2
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: