Clear all values in excel before writing each time

I have an excel file, which is not created through Robocorp. I have to write something at the end of each excecution. Before writing I have to clear the excel file. That means each time I have to overwrite the contents in excel. Please give a solution.

Maybe just remove existing sheets and add new one? Something like

Remove Existing Sheets And Add New
    Open workbook    Book.xlsx
    ${worksheets}=    List Worksheets
    FOR    ${sheet}    IN    @{worksheets}
        Remove worksheet    ${sheet}
    END
    Create worksheet    MySheet
    Save Workbook
    [Teardown]       Close workbook
5 Likes