Get cell color trong Excel

Dear Team,

Hiện tại mình không thấy activity Get cell color trong excel. Không biết bên mình đã release activity này chưa. Hay có cách nào lấy đc trong code không thì chỉ giúp mình với ạ.

Thank and regards

Hi Hải ,
Activity này sẽ bổ sung sau , trong thời gian này thì bạn workarround bằng đoạn script sau nhé
Đoạn script sau đọc màu tại vị trí C3:
Dim sheet=InAg1.CurrentWorkbook.Worksheets(1)
Dim ws = TryCast(sheet, Microsoft.Office.Interop.Excel.Worksheet)
Dim color = ws.Range(“C3”, “C3”).Interior.Color
MsgBox ( “Color= at C3=” + color.ToString())

excelColor.zip (2.4 KB)

Sau khi mình trao đổi lại với team thì cập nhật thêm cách này nữa nhé :

Bước 1 dùng invode method để chuyển active sheet
Bước 2 gọi hàm Get Cell Color .
image
image
excelColor.zip (2.4 KB)

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.