This invention relates to indazole compounds of formula (I) or (II) shown below. Each variable in formula (I) or (II) is defined in the specification. These compounds can be used to treat cancer.本發明係有關於一種如下式(I)或式(II)之吲唑化合物,式(I)或式(II)中X1~X9及R1~R7之相關定義說明於說明書中,這些化合物可用於治療癌症。