This topic describes the API operations that are related to the Font object of table documents.
Font
Range.Font
Queries the Font object.
Syntax
expression.Range.Fontexpression: the document type application object.
Example
async function example() { await instance.ready(); const app = instance.Application; // Query a range object. const range = await app.Range('A1'); // Query a font object. const font = range.Font; }
Properties
Range.Font.Size
Sets and queries the font size by using the Size property.
Syntax
expression.Range.Font.Sizeexpression: the document type application object.
Example
async function example() { await instance.ready(); const app = instance.Application; // Query a range object. const range = await app.Range('A1'); // Query a font object. const font = range.Font; // Set the font size font.Size = 30; // Query the font size. const size = await font.Size; console.log(size); }
该文章对您有帮助吗?