Exporting sheets from Excel documents

Last edited on


The testData API of Squish only supports reading the first sheet from Excel documents.

However, the following external tool (export_xls_sheet, based on Python 2.6 (or higher) and the xlrd and xlwt modules) can be used to export every desired sheet into a separate Excel document, so that it can then be read via the testData API.

path/to/python path/to/export_xls_sheet.py input_file sheet_index output_file
General usage of export_xls_sheet

The sheet_index for the first sheet is 0.

Using export_xls_sheet with JavaScript test scripts

function main()
    OS.system('"path/to/python.exe" "path/to/export_xls_sheet.py" "read_from_this.xls" 0 "write_to_this.xls"');

Using export_xls_sheet with Python test scripts

import os

def main():
    os.system('"path/to/python.exe" "path/to/export_xls_sheet.py" "read_from_this.xls" 0 "write_to_this.xls"')

Related Information