Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

make color cell in csv file for Excel

Tags:

csv

excel

I am generating csv file for importing into Excel. Excel has no previous formatting.

a) Is there any markup to add color definition to a cell in csv ?

If not possible in csv, then in which Excel-import format(s) can I do (a) and (b),
formats that are preferably ascii-based, and easy to generate ?

b) Can I add column widths definitions to csv columns ?

like image 517
Andrei Avatar asked Apr 19 '11 12:04

Andrei


People also ask

Can we add color in CSV file?

CSV is a pure data format without any formatting. It's a plain text file after all. So no, there is no way of adding colour.

Can I highlight in a CSV?

The short answer is no. The long answer is also no. Csv is a text data format, not a display format.

How do I auto color fill cells in Excel?

Simply select the cells that you want to fill, press the Alt + H keys on your keyboard, and then press the F + I keys. This will open the "Fill" menu. From there, you can use the arrow keys to select the color that you want to use, and then press the Enter key to fill the cells.


1 Answers

No and No! CSV files are basically raw cell data, with no formatting at all.

  • Office Open XML — for Excel 2007 and above
  • Excel 2003 XML — for Excel 2003 and above
  • HTML — not really a good option, Excel is a bit ornery in its interpretation of HTML
  • Sylk (.slk)
  • Open Document Format (.ods) — can be read by Excel 2010.
like image 150
Mark Baker Avatar answered Sep 20 '22 14:09

Mark Baker