
#include "../include/height_and_width.h"
#include "../include/file_path.h"
#include <oosxl.h>

#include <stdio.h>


void insert_and_delete()
{
    DocumentHandle doc = doc_create();
    WorkbookHandle wb = doc_get_workbook(doc);
    WorksheetHandle ws = wb_add_worksheet(wb, "insert and delete");

    ws_set_text(ws, 3, 3, "first row");
    ws_set_text(ws, 4, 3, "second row");
    ws_set_text(ws, 3, 6, "first column");
    ws_set_text(ws, 3, 7, "second column");

    ws_insert_row(ws, 4, 2);
    ws_delete_row(ws, 5, 5);

    ws_insert_col(ws, 7, 2);
    ws_delete_col(ws, 8, 8);

    if (!doc_save(doc, target_file("insert and delete.xlsx")))
        printf("Error saving file: %s\n", run_msg());

    doc_release(doc);
}

