Q:

custom datalabels in excel charts with C# using Microsoft Office Interop Excel

I created a chart in Excel with C# using Microsoft Office Interop Excel and I am having trouble to customize the datalabels
SeriesCollection seriesCollection7 = myChart7.Chart.SeriesCollection();
Series series7 = seriesCollection7.NewSeries();
series7.XValues = xValues7;
series7.Values = values7;
Excel.DataLabel dl1 = (Excel.DataLabel)series7.DataLabels(); // ERROR HERE
dl1.NumberFormat = "#0.0%";

A:

OPTION 1 (thanks @Jack-J-Jun-MSFT )
        chartPage7.ApplyDataLabels(Excel.XlDataLabelsType.xlDataLabelsShowValue, false, true, false, false, false, true, true);
        series7.HasDataLabels = true;
        Excel.DataLabel dl1 = series7.DataLabels(0);
        dl1.NumberFormat = "#,0%";

OPTION 2
        chartPage7.ApplyDataLabels(Excel.XlDataLabelsType.xlDataLabelsShowValue, false, true, false, false, false, true, true); // set label

        series7.DataLabels().NumberFormat = "#,0%";

