//------------------------------------------------------

// LABPP

// Create a chart in Excel based on the data in cells C7:F8

//------------------------------------------------------

int main()

{

    excel_attach(); // connect Excel


    int iChartDescr;

    object("create","excel_chart", iChartDescr); // create an object 

    excel_chart(iChartDescr,"AddChart"); // create a chart on the current page of the Excel spreadsheet

    excel_chart(iChartDescr,"SetChartType",5); // set chart type

    excel_chart(iChartDescr,"SetChartTitle","Квартирография"); // set title


    excel_select_range("C7:F8"); // select cells in excel table

    excel_chart(iChartDescr,"SetSourceDataRange"); // set these cells as chart data source

    object("delete",iChartDescr); // delete object


    excel_detach(); // disable Excel

}