Excelファイルを動的に作成しています。XlFileFormat.xlXMLSpreadsheet形式で保存すると条件付き書式を追加できません
ファイルをXlFileFormat.xlXMLSpreadsheetとして保存する必要があります。
ただし、ファイルをXlFileFormat.xlXMLSpreadsheetとして保存した場合、条件付き書式設定は追加されません。
ファイルを開く&条件付き書式設定ルールマネージャをチェックして何も追加されませんでした。
私はまた、ファイル保護を行っていません。
With .Range("A1")
.FormatConditions.Delete()
.FormatConditions.Add(CInt(XlFormatConditionType.xlCellValue), _
CInt(XlFormatConditionOperator.xlEqual), _
"=" & """OK""").Interior.Color = CInt(eColor.FromArgb_100_51_204_51)
.FormatConditions.Add(CInt(XlFormatConditionType.xlCellValue), _
CInt(XlFormatConditionOperator.xlNotEqual), _
"=" & """OK""").Interior.Color = CInt(eColor.FromArgb_100_255_0_0)
End With
私はXlFileFormat.xlXMLSpreadsheet形式としてそれを保存していないよ場合は、条件付き書式が正常に動作します。
アイデア?
は、コードのフォーマットに –