フィルターのクリア

How to color cell in a csv file?

30 ビュー (過去 30 日間)
faran
faran 2018 年 7 月 12 日
コメント済み: faran 2018 年 7 月 12 日
I am trying to color some cell in a csv file but the problem is that my code is working on a excel file and not csv file. Can anyone help? I am using the code below for coloring.
WB.Worksheets.Item(1).Range(rang).Interior.Color = hex2dec('FF0000');

採用された回答

Rik
Rik 2018 年 7 月 12 日
A csv file is just a file with text characters. It generally contains numeric values that are separated by commas, hence the name. (although it is possible to use other delimiters or enter text) So it is not possible to color a cell, because they do not exist. You can color a cell in Excel, but once you try to save that csv file, the formatting will be gone (unless you save it in another format that does support colored cells).
  1 件のコメント
faran
faran 2018 年 7 月 12 日
Thanks.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by