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

#include <iostream>


using namespace oo;

void insert_and_delete()
{
    Document* doc = create_document();
    Workbook* wb = doc->get_workbook();
    Worksheet* ws = wb->add_worksheet("insert and delete");

    ws->set_text(3, 3, "first row");
    ws->set_text(4, 3, "second row");
    ws->set_text(3, 6, "first column");
    ws->set_text(3, 7, "second column");

    ws->insert_row(4, 2);
    ws->delete_row(5);

    ws->insert_col(7, 2);
    ws->delete_col(8);

    auto path = target_file("insert and delete.xlsx");
    if (!doc->save(path.string().c_str()))
        std::cout << "Error saving file: " << run_msg() << std::endl;

    doc->release();
}

