Accessing historical values

Access to historical values is allowed by the functions D2_ArchValue, D2_ArchArr and D2_CalcStatFunc. The difference in the functions is in effectiveness of the values transmission between the interface D2000 WorkBook and the MS Excel.

Getting each value from the archive, the MS Excel calls the interface D2000 WorkBook by means of the function D2_ArchValue. This method could be ineffective when the archive block contains a large quantity of values.

The function D2_ArchArr is directly connected with so-called matrix. MS Excel defines the term Matrix (array in MS Excel terminology) as a continuous set of cells containing the same expression inserted in (for detailed description see the MS Excel help). From the point of view of interface D2000 WorkBook, a matrix is suitable just for the method of computing the values of individual cells. If the expression in cell contains an function, that gets a value of the Value array type, the function will be called for computation just once. The feature considerably reduces the number of calls of the interface D2000 WorkBook.


For the purpose of optimization, the D2000_WorkBook interface stores values from archive reading in the cache. If some values from archive has been already read, a new request for reading data is identical with the previous request, the data will be read from the cache instead of the archive. This is necessary because MS Excel can enforce calculation of cells at any moment and therefore the execution of requests for reading directly from the archive may takes too long. So if a request for reading data from the cache is not coming in 2 minutes, D2000_WorkBook automatically deletes the block of data from the cache and next request for the block is to be routed to the archive.

An advantage of such storing and reading is possible differences between the data in the cache and the data in the archive.

0 komentárov

Nie ste prihlásený. Akékoľvek zmeny, ktoré vykonáte, sa označia ako anonymné. Ak už máte svoj účet, pravdepodobne sa budete chcieť prihlásiť .