Specificare l'Estremo Oriente e il nome latino del carattere in Opzioni testo di Forma
Possibili scenari di utilizzo
A volte si desidera visualizzare il testo nel carattere della lingua dell’Estremo Oriente, ad esempio giapponese, cinese, tailandese, ecc. Aspose.Cells fornisceTextOptions.FarEastNameproprietà che può essere utilizzata per specificare il nome del carattere della lingua dell’Estremo Oriente. Inoltre, puoi anche specificare il nome del carattere latino utilizzandoTextOptions.LatinNameproprietà.
Specificare l’Estremo Oriente e il nome latino del carattere in Opzioni testo di Forma
Il seguente codice di esempio crea una casella di testo e vi aggiunge del testo giapponese. Quindi specifica i nomi dei caratteri latini e dell’Estremo Oriente del testo e salva la cartella di lavoro comefile Excel di output. Lo screenshot seguente mostra i nomi dei caratteri latini e dell’estremo oriente della casella di testo di output in Microsoft Excel.
Codice d’esempio
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// Create empty workbook. | |
Workbook wb = new Workbook(); | |
// Access first worksheet. | |
Worksheet ws = wb.Worksheets[0]; | |
// Add textbox inside the worksheet. | |
int idx = ws.TextBoxes.Add(5, 5, 50, 200); | |
Aspose.Cells.Drawing.TextBox tb = ws.TextBoxes[idx]; | |
// Set the text of the textbox. | |
tb.Text = "こんにちは世界"; | |
// Specify the Far East and Latin name of the font. | |
tb.TextOptions.LatinName = "Comic Sans MS"; | |
tb.TextOptions.FarEastName = "KaiTi"; | |
// Save the output Excel file. | |
wb.Save("outputSpecifyFarEastAndLatinNameOfFontInTextOptionsOfShape.xlsx", SaveFormat.Xlsx); |