csv - Dave's Blog

Search
My timeline on Mastodon

So You Want To Write Your Own CSV code? · TBurette

2014 May 25, 1:46

Additional considerations beyond the naïve implementation of a CSV parser.

PermalinkCommentscsv technical

Moving PowerShell data into Excel

2013 Aug 15, 10:04
PowerShell nicely includes ConvertTo-CSV and ConvertFrom-CSV which allow you to serialize and deserialize your PowerShell objects to and from CSV. Unfortunately the CSV produced by ConvertTo-CSV is not easily opened by Excel which expects by default different sets of delimiters and such. Looking online you'll find folks who recommend using automation via COM to create a new Excel instance and copy over the data in that fashion. This turns out to be very slow and impractical if you have large sets of data. However you can use automation to open CSV files with not the default set of delimiters. So the following isn't the best but it gets Excel to open a CSV file produced via ConvertTo-CSV and is faster than the other options:
Param([Parameter(Mandatory=$true)][string]$Path);

$excel = New-Object -ComObject Excel.Application

$xlWindows=2
$xlDelimited=1 # 1 = delimited, 2 = fixed width
$xlTextQualifierDoubleQuote=1 # 1= doublt quote, -4142 = no delim, 2 = single quote
$consequitiveDelim = $False;
$tabDelim = $False;
$semicolonDelim = $False;
$commaDelim = $True;
$StartRow=1
$Semicolon=$True

$excel.visible=$true
$excel.workbooks.OpenText($Path,$xlWindows,$StartRow,$xlDelimited,$xlTextQualifierDoubleQuote,$consequitiveDelim,$tabDelim,$semicolonDelim, $commaDelim);
See Workbooks.OpenText documentation for more information.
PermalinkCommentscsv excel powershell programming technical

When they went to the Moon, they received the same per diem...

2012 Aug 28, 4:38


When they went to the Moon, they received the same per diem compensation as they would have for being away from base in Bakersfield: eight dollars a day, before various deductions (like for accommodation, because the government was providing the bed in the spaceship).

theatlantic:

Apollo 11’s Astronauts Received an $8 Per Diem for the Mission to the Moon

The astronauts of Apollo 11: Intrepid explorers. Inspirational heroes. Government employees.

Read more. [Image: Reuters]

PermalinkCommentshumor space nasa moon government

URI Fragment Identifiers for the text/csv Media Type

2011 Apr 29, 3:55This memo defines URI fragment identifiers for text/csv MIME entities. These fragment identifiers make it possible to refer to parts of a text/csv MIME entity, identified by cell, row, column, or slice.PermalinkCommentscsv uri technical mime reference

YouTube - Broadcast Yourself.

2008 Jul 22, 11:09Radiohead released the data points from their latest video as CSV free for us to use, so expect odd CG videos featuring Thom York.PermalinkCommentsradiohead cc remix video

RFC 4180 - Common Format and MIME Type for Comma-Separated Values (CSV) Files

2007 Jan 30, 2:41I was unaware of it but there's a standard for CSV files and it defines how to encode quotes, commas, and newlines inside of records.PermalinkCommentscsv specification rfc standards ietf mime comma-separated-value excel encoding

TPCSv8 - Articles - The Cutest Human-Test: KittenAuth

2006 Apr 10, 1:35PermalinkCommentsblog development internet password security tools tutorial software captcha spam authentication cool humor cute
Older Entries Creative Commons License Some rights reserved.