This site requires JavaScript to be enabled


Dear Tricentis qTest users,

If you would like to submit a Tricentis qTest ticket,

please use this support request form.

Tosca Version
IncidentLookup using list
How can we help?

Solution Suggestions

Please enter your question to get suggestions.
Boolean Operators
OR or vertical bar symbol (|)
Finds a match if either the terms exist in a document (a union using sets).
Finds a match if both terms exist in a document (an intersection of sets).
NOT, minus (-), or exclamation point (!)
Excludes documents that contain the term after NOT (a difference of sets).
Asterisk (*)
The asterisk symbol performs a multi character wildcard search.
Percent sign (%)
The percent sign performs a single character wildcard search.
Quotation marks (")
Use quotation marks to search for an exact phrase with multiple terms.
For examples and more information look at our Knowledge Base: Advanced Search On The Support Portal

Macro for TestCase Design (TCD) Export to Excel

This article is about an Excel Macro which is used to let your TCD Export look fancy.


Business users want to know which business data they actually use within their test cases.
Since business users probably do not have access to Tosca, you need to export the TestSheets to several Excel sheets.


To be able to run the Macro, simply follow those steps:

  1. Copy Macro to Directory %appdata%\Microsoft\Excel\XLSTART
  2. Restart Excel


  1. Open an empty Excel
  2. Copy and paste each TestSheet to a separate Excel sheet using "Copy table to clipboard"
    Be sure no instances and additional columns (e.g. Filter) are shown!
  3. Run Macro
  4. Save Excel
  5. Hand Excel out to business users

Macro functionality

Macro functionalities are in specified order:

  1. Reset all worksheet names
  2. Activate worksheet if sProofCell is not empty
  3. <if activated | default FALSE> color whole Excel sheet if invalid text exists
  4. Align everything to left
  5. Clear row 1
  6. Set Font to Bold for first 2 columns
  7. Set Font to Bold for testcase row (row 2)
  8. Resize structure columns to width 1.3
  9. Resize last structure column to width 55
  10. Resize data columns to AutoFit (max width 80)
  11. Change row color of Precondition
  12. Change row color of Process
  13. Change row color of Verification
  14. Change cells including sTextSearchString (Default: TODO)
  15. Freeze pane for structure columns and testcase row
  16. Rename worksheet
  17. Go to next worksheet

Macro modification

If necessary you can modify the Macro according to your needs.
All relevant Information are stored as global variables:

Const sProofCell As String = "A2" | If this Cell is empty, the Macro is not executed on this Excel sheet

Const lColorVerification As Long = 5296274 | 5296274 = Green
Const lColorProcess As Long = 15773696 | 15773696  = Blue
Const lColorPrecondition As Long = 14277081 | 14277081 = Grey
Const lColorSearchString As Long = 65535 | 65535 = Yellow
Const lColorInvalidName As Long = 16764159 | 16764159 = Pink
Const sTextVerification As String = "Verifikation" | Row with this exact text will be colored as defined in lColorVerification
Const sTextProcess As String = "Prozessschritt" | Row with this exact text will be colored as defined in lColorProcess
Const sTextPrecondition As String = "Vorbedingungen" | Row with this exact text will be colored as defined in lColorPrecondition
Const sTextSearchString As String = "*TODO*" | Cell with this text will be colored as defined in lColorSearchString
Const sTextInvalidName As String = "<Text>" | Excel sheet with this exact text will be colored as defined in lColorInvalidName


Tosca is the perfect solution

Optimize - Manage - Automate

Download Trial