Imposta il colore della scheda del foglio di lavoro
Contents
[
Hide
]
Aspose.Cells ti consente di cambiare il colore delle singole schede del foglio di lavoro per renderle prominenti rispetto al resto. Ad esempio, puoi impostare Spese in rosso, Vendite in verde, Attività in blu, ecc.
Impostazione del colore della scheda del foglio di lavoro con Microsoft Excel
- Fare clic con il pulsante destro del mouse su una scheda nella scheda nella parte inferiore del foglio di lavoro corrente.
- SelezionareColore scheda.
- Seleziona un colore dalla tavolozza.
- ClicOK.
Le linguette sono state colorate di rosso, verde e blu
Impostazione del colore della scheda del foglio di lavoro con Aspose.Cells
Il codice di esempio seguente mostra come impostare il colore della scheda con Aspose.Cells.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java | |
// The path to the documents directory. | |
String dataDir = Utils.getDataDir(SetWorksheetTabColor.class); | |
// Instantiate a new Workbook | |
Workbook workbook = new Workbook(dataDir + "Book1.xls"); | |
// Get the first worksheet in the book | |
Worksheet worksheet = workbook.getWorksheets().get(0); | |
// Set the tab color | |
worksheet.setTabColor(Color.getRed()); | |
// Save the Excel file | |
workbook.save(dataDir + "worksheettabcolor.xls"); |