Qlik Community

QlikView Documents

QlikView documentation and resources.

Announcements
Document boards are being consolidated, this board no longer allows NEW documents READ MORE

Create Colour Variables from an Excel Workbook

cancel
Showing results for 
Search instead for 
Did you mean: 
richard_pearce6
Luminary Alumni
Luminary Alumni

Create Colour Variables from an Excel Workbook

Attachments

Hi,

Here's a basic script which loads an excel workbook sheet containing colours into QlikView.

Once loaded the script loops through the table and creates variables which can be used in your design template.

I will be uploading a video tutorial to my blog shortly.

Richard

QlikCentral.Com

Comments
ThornOfCrowns
Specialist II
Specialist II

Hi Richard,

we use a similar script:

Colour_Table:
LOAD VariableName,
     RGBValue,
     ColourName
FROM
[\\..\..\Colour_Scheme.xlsx]
(ooxml, embedded labels, table is Colours);

NumRows=NoOfRows('Colour_Table');

FOR i=1 to $(NumRows)
   let vVariableName = FieldValue('VariableName',$(i));    
   let vVariableRGB = FieldValue('RGBValue',$(i));    
   let $(vVariableName) = '=$(vVariableRGB)';   
NEXT

Comment Tables Colour_Table With 'This is the new way';

richard_pearce6
Luminary Alumni
Luminary Alumni

Great minds James!!


ThornOfCrowns
Specialist II
Specialist II

dlanglois
Contributor
Contributor

Hi Richard,

I have done something similar and I am using a function for each color in a given chart's palette. I find that when I reference these colors using the color(n) function, the "fixed" option for the color is used instead of the calculated color. Have you experienced this as well? I am struggling to find a solution.

Thanks,

David

0 Likes
richard_pearce6
Luminary Alumni
Luminary Alumni

Hi David,

I'm not sure if I fully understand your issue. I have instances where using the $(=RGB(*,*,*))  a variable doesn't work. Usually within conditional statements and I have to use the individual colour values

RGB($(Value),$(Value),$(Value)).

Could you provide a little more information and perhaps a link to an example?

Thanks

Richard

richard_pearce6
Luminary Alumni
Luminary Alumni
0 Likes
datanibbler
Champion
Champion

Hi,

we have sth like that as well, only we don't use an Excel file, but just a qvd file with the SET commands. It's very helpful to make it all appear somewhat uniform and not have it blaring in all kinds of colours.

Version history
Last update:
‎2014-07-07 05:18 PM
Updated by: