Frage

I am trying to check against two value in a row, if that check passes then I want to copy the entire row at the end of the sheet.

LAST_ROW = 4488
CURRENT_ROW = 3
NEW_ROW = LAST_ROW + 2

while CURRENT_ROW <= LAST_ROW:
    if Cell(CURRENT_ROW, 63).value == "12" or Cell(CURRENT_ROW, 63).value == 12:
        if Cell(CURRENT_ROW, 65).value == "12" or Cell(CURRENT_ROW, 63).value == 12:
            for column in range(200):
                Cell(NEW_ROW, column).copy_from(Cell(CURRENT_ROW, column))
            NEW_ROW += 1
    CURRENT_ROW += 1

I get an "Exception: Exception from HRESULT: 0x800A03EC" error from the line "Cell(NEW_ROW..." and I am not sure why. Thank you as I have little to no experience with python and none with Data nitro.

War es hilfreich?

Lösung 2

HRESULT: 0x800A03EC is an unknown (to VB.Net) COM error. This usually happens when Excel throws some error because your input or parameters were wrong or didn't work. I suggest you test your code in Excel VBA to make sure it works. It will be easier to diagnose there.

Andere Tipps

Just incase anyone else stumbles upon this. Excel column and row values start at 1 not 0.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top