Laserfiche WebLink
Spreadsheet Integration TSTool Doc umentation <br />Spreadsheet Integration - 6 <br />use of Python or similar adds another level of communicatio n between TSTool and Excel, but <br />may be necessary to achieve the level of data manipulation and integration that is required. <br />Python versions that have been tested wi th TSTool ’s RunPython() command include: <br />o Python xlrd (http://pypi.python.org/pypi/xlrd ) and xlwt modules <br />(http://pypi.python.org/pypi/xlwt ): <br /> The xlwt module does not handle *.xlsx files as of version 0.7.4 <br /> Requires understanding the internals of Excel data representations <br />o IronPython (see: http://www.ironp ython.info/index.php/Interacting_with_Excel ): <br /> Uses native Microsoft .NET libraries (tighter integration) but IronPython lags <br />behind Python <br /> Requires understanding the internals of Excel data representations <br />o Jython (http://www.jython.org/): <br /> Is written in Java (see the TSTool RunPython() command for the version that <br />is shipped with the TSTool software installer) <br /> Has potential to allow running Python scripts with tight integration to TSTool <br />software , including access to TSTool internal objects <br /> <br />10.5 Manipulating TSTool Files from Excel <br /> <br />There may be a need to create TSTool files from Excel. For example, TSTool supports the DateValue file <br />format, which is essentially a d elimited file with additional header information with time series properties. <br />Other TSTool time series data files are text files th at adhere to specifications of data providers (e.g., <br />model formats). TSTool time series product files that descr ibe graphs and command s are documented <br />and can be written out with Excel or other software . Excel macros can be written to create these files and <br />then TSTool can be called from Excel as described above. <br /> <br />In the future, standard Excel macros may be distributed with TSTool to facilitate Excel import/export <br />capabilities. <br /> <br />10.6 Testing Excel and TSTool Software and Command Files <br /> <br />The Quality Control chapter explains how to use TSTool features for testing, including testing <br />commands and user -defined command files. It also is possible to use TSTool test features in conjunction <br />with Excel: <br /> <br />• t o understand the similarity or differences between TSTool commands and Excel formulas <br />(differences may be by design, due to precision of analysis, etc.) <br />• to validate a TSTool command by comparing to Excel, in particular for more complex <br />functionality that cannot easily be validated with visual inspection <br />• to compare an analysis performed wit h multiple TSTool commands and the corresponding Excel <br />formulas (for example to prototype the analysis in one of the tools and then fully implement in <br />the other) <br /> <br />Specific issues related to testing with Excel include: <br /> <br />• TSTool’s limited ability to read Exce l files may limit testing . For example, see the <br />ReadTableFromExcel() command documentation for limitations . One known issue is that <br />Excel formula results may not be accessible to the ReadTableFromExcel() command <br />because the formula results in the cell ma y be computed by Excel when the workbook file is <br />opened and is not stored in the file. In this case it may be necessary to copy the Excel worksheet, <br />134