Error saving dump_worksheet. Write relations requires 4 parameters, 3 given.

Issue #502 resolved
Zahir Koradia
created an issue

The call to write_rels on line 252 in passes three paramters, but the definition of write_rels in expects a fourth parameter vba_controls_id.

Assuming is not inteded to preserve vba_controls passing a fourth param None in solves the problem.

Comments (7)

  1. Zahir Koradia reporter

    I was essentially trying to make a copy of a large sheet, eventually editing cell contents in the loop. This is what I was running.

    input_file = args[0]
    read_wb = load_workbook(input_file, data_only = True)
    read_sheet = read_wb.worksheets[0]
    write_wb = Workbook(optimized_write = True)
    write_sheet = write_wb.create_sheet()
    sheet_num = 0
    for read_sheet in read_wb.worksheets:
        sheet_num += 1
        print "Sheet: %s" % (sheet_num)
        write_sheet = write_wb.create_sheet()           
        row_num = 0
        for row in read_sheet.rows:
            row_num += 1
            print "Row: %s" % (row_num)
            write_row = []
            for cell in row:
                write_cell = WriteOnlyCell(ws = write_sheet, value = cell.value)
                write_cell.comment = self.clone_comment(cell.comment)
  2. Log in to comment