Files
Thom Lamb 2cd6df6481 Initial commit of the ClosedXML library
Establishes the foundational structure, core Excel functionality, and tooling.

- Implements base components for cells, ranges, columns, and rows.
- Integrates a custom calculation engine with a wide range of Excel functions.
- Adds comprehensive support for styling, conditional formatting, data validation, comments, pictures, and charts.
- Configures build setup, project metadata (NuGet), and developer guidelines.
- Includes editor and Git attributes for consistent code style and line endings.
2026-06-23 11:02:53 -05:00

42 lines
1.0 KiB
C#

using System;
using ClosedXML.Excel;
namespace ClosedXML_Examples.Styles
{
public class UsingPhonetics : IXLExample
{
#region Methods
// Public
public void Create(String filePath)
{
var wb = new XLWorkbook();
var ws = wb.Worksheets.Add("Using Phonetics");
var cell = ws.Cell(1, 1);
// Phonetics are implemented as part of the Rich Text functionality. For more information see [Using Rich Text]
// First we add the text.
cell.RichText.AddText("みんなさんはお元気ですか。").SetFontSize(16);
// And then we add the phonetics
cell.RichText.Phonetics.SetFontSize(8);
cell.RichText.Phonetics.Add("げん", 7, 8);
cell.RichText.Phonetics.Add("き", 8, 9);
//TODO: I'm looking for someone who understands Japanese to confirm the validity of the above code.
wb.SaveAs(filePath);
}
// Private
// Override
#endregion
}
}