Hello, how to change the label font size of a column in the current excel sheet excel sheet.

KVS 0 Reputation points
2026-01-28T20:25:16.7933333+00:00

Hello, how to change the label font size of a column in the current excel sheet which is open

Microsoft 365 and Office | Excel | For home | Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Q&A Assist
    2026-01-28T20:25:26.5866667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To change the label font size of a column in the current Excel sheet, you can use the Excel JavaScript API to manipulate the font properties of the data labels. Here’s a general approach:

    1. Select the data label you want to format.
    2. Use the format property of the data label to access font settings.
    3. Set the size property to the desired font size.

    Here is a sample code snippet that demonstrates how to change the font size:

    Excel.run(function (context) {
        var chart = context.workbook.worksheets.getActiveWorksheet().charts.getItem("ChartName");
        var dataLabel = chart.series.getItemAt(0).dataLabels;
        dataLabel.format.font.size = 14; // Set font size to 14
        return context.sync();
    }).catch(function (error) {
        console.log(error);
    });
    

    Make sure to replace "ChartName" with the actual name of your chart and adjust the index in getItemAt(0) to target the correct series.

    This will change the font size of the data labels in the specified chart on the active worksheet.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.