Sunday 15 March 2015

c# - How can I format text when writing to CSV file -


I have a part of the code to write a CSV file, but the formatting is bad. I'm thinking if there is a command or string that I can send to the seam for signal that it should bold the first line of text and the center text for all the cells. Is this possible?

  Stream-Vector SW = Faucet; Try {This.SetStatus (DataLogUIStrings.strSavingToCSVFile); Sw = new streamer (export filename, this.appendExport); // first line of csv sw.WriteLine ("Start Time, End Time, Date, Job ID, Alarm Calculation"); Foreach (jobs in jobs in jobs) {// remaining CSV rows sw.WriteLine (job.GetJobInformation (). Change (',', '\ t')); } This.SetStatus (string.Format (DataLogUIStrings.strJobsExported, jobsToExport.Count)); } {{...}   

My search has come up with nothing, I expected that there were some Excel formula commands so that string bus "bold (start time, Andy Time, ...) "; If I do not have any alternate address that might open Excel sheet and manually formatting (this software is about 24 days of production).

There is no substitute for text formatting with CSV. This is just plain text (or value).

If you want formatting with Excel cells - save it as XLS or XLSX!

No comments:

Post a Comment