Ricezione di notifiche durante la fusione dei dati con Smart Markers
Il seguente frammento di codice dimostra l’uso dell’interfaccia ISmartMarkerCallBack per definire una nuova classe che gestisce il richiamo del metodo WorkbookDesigner.Process.
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
class SmartMarkerCallBack: ISmartMarkerCallBack | |
{ | |
Workbook workbook; | |
public SmartMarkerCallBack(Workbook workbook) { | |
this.workbook = workbook; | |
} | |
public void Process(int sheetIndex, int rowIndex, int colIndex, String tableName, String columnName) { | |
Console.WriteLine("Processing Cell: " + workbook.Worksheets[sheetIndex].Name + "!" + CellsHelper.CellIndexToName(rowIndex, colIndex)); | |
Console.WriteLine("Processing Marker: " + tableName + "." + columnName); | |
} | |
} |
Il resto del processo include il caricamento del foglio di calcolo del designer contenente gli Smart Markers con WorkbookDesigner e il suo processamento impostando la sorgente dei dati. Per mantenere l’esempio semplice, è stato utilizzato un foglio di calcolo del designer predefinito contenente solo due Smart Markers come mostrato nella schermata sottostante, dove la sorgente dei dati viene creata dinamicamente per unire i dati in base agli Smart Markers specificati.
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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
|