Xbasic
Office::ExcelDocumentAddFormat Method
Syntax
.AddFormat as Office::Format ([InitialFormat as Office::Format])
Arguments
- InitialFormatOffice::Format
An optional Office::Format object to copy values into the new format.
Returns
- resultOffice::Format
Returns a new format object.
Description
Create a new format and add it to the document. You can pass an existing format to copy its values into the new one.
Example
dim Doc as Office::ExcelDocument dim Format as Office::Format dim Font as Office::Font Format = Doc.AddFormat() Font = Doc.AddFont() Font.Color = Office::Color::DarkBlue Font.Name= "Tahoma" Font.Size = 14 Font.Bold = .t. Format.Font = Font Format.HorizontalAlignment = Office::HorizontalAlignment::Center
See Also