Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
jozisvk11
Creator
Creator

Can I get excel file to qlikview with exact colours formats ???

I have table, which is corrected according to situation by different users. Users add different colours to table to improve lucidity (there is no logic !!!). Can I get this excel table to qlikview with colours formats.

Table is for example:

  

WorkroomCustomer IDItem numberText item
D10MENZ00T10170195V230419Schubstange S.M-Serie 258722
D10MENZ00T10170195V230417Schere L.M-Serie 258721
D10MENZ00T10170195V230420Schere Stiel M-Serie 258723
D10RONA01T10170193V238831H7800, Foot R_452.1064-001
D09RONA01T10170603V278844Bearing cover 695-15-706ED
D10RONA01T10170505V216365Armtraeger/1006335
D10RONA01T10170646V245589Base 4705993
D10RONA01T10170627V245591Pelare 4706114
D08KION01T10171214V283570Gabelhaken 3318698
D10ANDR03T10170637V279330Bearing cover 300854256
D10ANDR03T10170637V279332Bearing cover 300854330
D10ANDR03T10170637V279333Bearing cover 300854332
D10ANDR03T10170637V279331Bearing cover 300854257

Thank you.

1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

You can't get colorcode while loading!


getting that colorcode is the objective here!!

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

7 Replies
Anil_Babu_Samineni

Yes, This is possible. But, We required to use multiple Conditions to achievve this

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
jozisvk11
Creator
Creator
Author

How can I do that ?

Anil_Babu_Samineni

I am sorry, I can't help y due to traveling till Tuesday.. May be someone offer you


and, my intention is this


If(match(field, '','') and match(field 1, '',''), colorcode)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
vinieme12
Champion III
Champion III

The Answer is NO

You simply CANNOT get the formatting into Qlikview.

You will need create a custom function in excel (refer link below)

https://www.thespreadsheetguru.com/the-code-vault/2014/11/5/retrieve-excel-cells-font-fill-rgb-color...

Now create a new column with the function which will then have the RGB values

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
vinieme12
Champion III
Champion III

You can't get colorcode while loading!


getting that colorcode is the objective here!!

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
effinty2112
Master
Master

Hi Josef,

I have an answer but it's a bit clunky because it requires some work on your excel sheet.

This VBA function can be used to add a new column to your sheet. If saved to your personal workbook you can call it as  the user defined function  PERSONAL.XLSB!RGBcomp(C2)

Function RGBcomp(ByVal Target As Range) As String

Dim HEXcolor As String

HEXcolor = Right("000000" & Hex(Target.Font.Color), 6)

RGBcomp = CInt("&H" & Right(HEXcolor, 2)) & _

", " & CInt("&H" & Mid(HEXcolor, 3, 2)) & _

", " & CInt("&H" & Left(HEXcolor, 2))

End Function

This is a paste of the excel spreadsheet with the PGBcomp function acting on the Item number cell. The colours of the cells have been lost on the copy and paste. 

WorkroomCustomer IDItem numberText itemRGBcomp
D10MENZ00T10170195V230419Schubstange S.M-Serie 25872251, 51, 153
D10MENZ00T10170195V230417Schere L.M-Serie 2587210, 0, 255
D10MENZ00T10170195V230420Schere Stiel M-Serie 2587230, 0, 0
D10RONA01T10170193V238831H7800, Foot R_452.1064-0010, 0, 0
D09RONA01T10170603V278844Bearing cover 695-15-706ED0, 0, 0
D10RONA01T10170505V216365Armtraeger/1006335128, 0, 128
D10RONA01T10170646V245589Base 4705993128, 0, 128
D10RONA01T10170627V245591Pelare 4706114128, 0, 128
D08KION01T10171214V283570Gabelhaken 33186980, 0, 0
D10ANDR03T10170637V279330Bearing cover 3008542560, 255, 255
D10ANDR03T10170637V279332Bearing cover 3008543300, 255, 255
D10ANDR03T10170637V279333Bearing cover 3008543320, 255, 255
D10ANDR03T10170637V279331Bearing cover 3008542570, 255, 255

Save the workbook , you may need to save it as an xlsm file.

Load it into QV:

Customer ID Item number Text item Workroom
ANDR03T10170637V279330Bearing cover 300854256D10
ANDR03T10170637V279331Bearing cover 300854257D10
ANDR03T10170637V279332Bearing cover 300854330D10
ANDR03T10170637V279333Bearing cover 300854332D10
KION01T10171214V283570Gabelhaken 3318698D08
MENZ00T10170195V230417Schere L.M-Serie 258721D10
MENZ00T10170195V230419Schubstange S.M-Serie 258722D10
MENZ00T10170195V230420Schere Stiel M-Serie 258723D10
RONA01T10170193V238831H7800, Foot R_452.1064-001D10
RONA01T10170505V216365Armtraeger/1006335D10
RONA01T10170603V278844Bearing cover 695-15-706EDD09
RONA01T10170627V245591Pelare 4706114D10
RONA01T10170646V245589Base 4705993D10

Text item text color is defined by the formula:

=RGB(subfield(RGBcomp,',',1),subfield(RGBcomp,',',2),subfield(RGBcomp,',',3))

Good luck

Andrew

vinieme12
Champion III
Champion III

Attaching a sample workbook for reference

Paste this in the Module

Function TextColor(rng As Range, Optional formatType As Integer = 0) As Variant

Application.Volatile True

    Dim colorVal As Variant

    colorVal = Cells(rng.Row, rng.Column).Font.Color

            Color = (colorVal Mod 256) & ", " & ((colorVal \ 256) Mod 256) & ", " & (colorVal \ 65536)

End Function

Function FillColor(rng As Range, Optional formatType As Integer = 0) As Variant

Application.Volatile True

    Dim colorVal As Variant

    colorVal = Cells(rng.Row, rng.Column).Interior.Color

            Color = (colorVal Mod 256) & ", " & ((colorVal \ 256) Mod 256) & ", " & (colorVal \ 65536)

End Function

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.