Start a new topic

export to Excel with Title using variables

[This topic is migrated from our old forums. The original author name has been removed]

I would like to know if it there is a way to include in the @export statement a variable to be used in the name of the title to be exported to Excel. example: @export on; @export set filename="F:\testfile_claims2014.xls" ExcelTitle="Claims Detail" ExcelIntroText="1201 Santa Services " format="xls"; 1201 is stored in variable GROUPID Santa Services is stored in variable GROUP_NAME I would like to be able that the ExcelIntroText changes according to the GROUPID and GROUP_NAME, without having to do it manually. Is that possible?
1 Comment

[This reply is migrated from our old forums.]

Re: export to Excel with Title using variables
Elaine, If you are looking to use variables in the @export title parameters that are in the result set produced by a SELECT then the answer is no. If you would like to define variables try the following. The first two @echo calls are used to set two variables with the values. The last noshow option specifies that the Variable window will not be displayed for inputing the values. If you remove the noshow option, you will be prompted for values for the variables. @echo ${GROUP_ID||1201||||noshow}$; @echo ${GROUP_NAME ||Santa Services||||noshow}$; @export on; @export set Filename="F:\testfile_claims2014.xls" ExcelTitle="Claims Detail" ExcelIntroText="${GROUP_ID}$ ${GROUP_NAME}$" Format="xls"; If this is not what you are looking for, please clarify what you want to achieve. Regards Roger