Skip to content

DevExpress-Examples/spreadsheet-document-api-use-worksheet-data-bindings-to-process-data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spreadsheet Document API - Use Worksheet Data Bindings to Log and Process Data

This example illustrates the use of the DevExpress.Spreadsheet.Workbook instance to perform the calculations on data bound to an external data source. The calculation result is located in the cell exposed as the data source for the DevExpress.XtraGauges.Win.GaugeControl control.

image

Implementation Details

The source data are pairs of System.Diagnostics.PerformanceCounter object values. Performance samples (TwoCounterSample objects) are collected at the time interval specified by the timer. The samples are stored in the collection. A WorksheetProcessor object instance is created to process the collection of samples. A WorksheetProcessor includes a Workbook  instance with a Worksheet sheet containing a table bound to the performance data collection. The TableCollection.Add method is used to create a table bound to data. The CORREL statistical function calculates the correlation coefficient. The cell containing the calculation result is exposed as the data source using the CellRange.GetDataSource method. The worksheet data source providing a correlation coefficient value is bound to the Gauges.Circular.ArcScaleComponent.DataBindings and LabelComponent.DataBindings collections of the circular gauge control. The gauge control shows the correlation dynamically.

Files to Review