books - Dave's Blog

Search
My timeline on Mastodon

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

International - Max Fisher - Welcome to America, Please Be On Time: What Guide Books Tell Foreign Visitors to the U.S. - The Atlantic

2012 Jun 7, 9:15

Such tips as: “don’t hand out cash to dinner guests” reveal what foreign tourists findsurprising about coming to America.

PermalinkCommentshumor travel us

How Bots Seized Control of My Pricing Strategy (bueno.org)

2012 Feb 22, 6:54

Automated authors writing books and automated middle men trying to sell over priced books at a profit. The author of the blog post claims to be human, but I’m not so sure.

PermalinkCommentshumor technical amazon economics bots

Schneier on Security: Ebook Fraud

2011 Apr 4, 11:18Two eBook frauds involving the automated creation and publishing of books in order to make money off the long tail. The spam of books.PermalinkCommentsebook fraud bruce-schneier security amazon copyright publishing

Sad bookshelf is sad...

2010 Nov 22, 1:52
So sad
PermalinkCommentstechnical

The death of a meme: Donald Glover calls a truce with the new Peter Parker [Spider-man]

2010 Nov 21, 9:00PermalinkCommentsSpider-man Andrew Garfield Comic Books Dancing donald glover Movies Peter Parker Reality TV Superheroes Television technical

File-sharing has weakened copyright - and helped society

2010 Jul 1, 3:33"By charting the production of new books, new music albums, and new feature films over the last decade, the authors tried to see whether creative output went up or down in correlation with file-sharing." They find that creative output is going up while piracy also increases. But this is correlation not causation. They can't say there wouldn't be more creative output with less piracy. Regardless, still an interesting statistic.PermalinkCommentsarstechnica copyright law economics ip piracy music technical

CMAP #9: Ebooks

2010 May 10, 8:43Charles Stross on the intersection of ebooks and the publishing industry. Includes the answer to the misinformed question "why are you charging so much for access to the file your authors emailed you?" Also includes this quote on Cory Doctorow "... Cory is a Special Snowflake with EFF superpowers and New York Times Bestseller mojo which make him immune to the normal laws of man and nature."PermalinkCommentscharles-stross cory-doctorow ebook drm amazon publishing kindle apple book

Post mortem - Charlie's Diary

2010 Mar 12, 9:20Charles Stross on the business and technical aspects of writing and selling a series of books - specifically The Family Trade series for which the next in the series is due out soon.PermalinkCommentscharles-stross family-trade book literature business

Popular Science Archive - Google Books

2010 Mar 5, 3:15A full archive of Popular Science magazines.
PermalinkCommentspopular-science google books magazine history archive

The sequel stinks: critics trash new Google Books settlement

2010 Jan 29, 11:06PermalinkCommentsgoogle copyright book books law ip article

Read Houdini's books via Google Books and Library of Congress Boing Boing

2010 Jan 29, 9:18PermalinkCommentsbook houdini read todo

Google Books - Weekly World News Covers

2009 Dec 29, 1:31PermalinkCommentshumor google archive newspaper weeklyworldnews

Android eBook Reader And Makers

2009 Dec 13, 1:27

I was reading Makers, Cory Doctorow's latest novel, as it was serialized on Tor's website but with no ability to save my place within a page I set out to find a book reading app for my G1 Android phone. I stopped looking once I found Aldiko. Its got bookmarks within chapters, configurable fonts, you can look-up words in a dictionary, and has an easy method to download public domain and creative common books. I was able to take advantage of Aldiko's in-app book download system to get Makers onto my phone so I didn't have to bother with any conversion programs etc, and I didn't have to worry about spacing or layout, the book had the correct cover art, and chapter delimiters. I'm very happy with this app and finished reading Makers on it.

Makers is set in the near future and features teams of inventors, networked 3d printers, IP contention, body modifications, and Disney -- just the sort of thing you'd expect from a Cory Doctorow novel. The tale seems to be an allegory for the Internet including displacing existing businesses and the conflict between the existing big entertainment IP owners and the plethora of fans and minor content producers. The story is engaging and the characters filled out and believable. I recommend Makers and as always its Creative Commons so go take a look right now.

PermalinkCommentstor aldiko cory doctorow g1 makers ebook android book

Language Log » Google Books: A Metadata Train Wreck

2009 Sep 10, 8:22Geoff Nunberg investigates issues in Google Books and in the comments Google Book's team manager responds in the comments. Apparently metadata is bad everywhere and not an issue new to the Web and user generated content or tagging. Like finding Feynman lectures categorized as Death Metal on Napster back in the day.PermalinkCommentslanguage google library metadata catalog

A library without the books - The Boston Globe

2009 Sep 10, 5:02Makes sense to me. Its the content not the transmission medium.
PermalinkCommentsbook library education literature news

Tor.com / Science fiction and fantasy / Blog posts / Cory Doctorow’s <em>Makers</em> Index

2009 Jul 15, 7:00"Tor.com is proud to be serializing Makers, Cory Doctorow’s upcoming novel, which goes on sale from Tor Books in November."PermalinkCommentscory-doctorow scifi tor makers book literature cc free

Amazon.com: Shatnerquake: Jeff Burk: Books

2009 May 1, 11:25Seems like this would be a good gift for someone. "...all of the characters ever played by William Shatner are suddenly sucked into our world. Their mission: hunt down and destroy the real William Shatner. Featuring: Captain Kirk, TJ Hooker, Denny Crane, Rescue 911 Shatner, Singer Shatner, Shakespearean Shatner, Twilight Zone Shatner, Cartoon Kirk, Esperanto Shatner, Priceline Shatner, SNL Shatner, and - of course - William Shatner!"PermalinkCommentshumor book gift wishlist william-shatner shatner startrek via:boingboing

Amazon.com: The Complete April Fools' Day RFCs: Thomas, A. Limoncelli, Peter, H. Salus: Books

2009 Apr 8, 10:40A good gift for a particular subset of people I know. "Also has commentary from Limoncelli and some other internet gods. Worth many geek points - full of lulz!!"PermalinkCommentsgift wishlist book ietf reference rfc humor

Amazon.com: A Million Random Digits with 100,000 Normal Deviates: RAND Corporation: Books

2008 Oct 31, 7:10Bruce Schneier pointed out this book: "A Million Random Digits with 100,000 Normal Deviates (Paperback)". Its 600 pages of random numbers. I'd get a copy if it didn't cost $90! From the stats page Amazon lists the 100 most used words in the book: "6 8 11 19 23 28 30 32 37 38 42 47 52 54 56 60 72 77 80 84 86 92 101 102 107 108 111 115 125 126 131 143 147 148 150 157 158 163 166 167 171 179 183 188 190 197 206 207 212 215 218 220 226 228 230 234 236 242 247 249 251 253 261 265 272 292 297 304 311 323 332 336 337 338 344 345 354 356 358 359 364 371 372 374 384 389 391 409 412 413 421 433 436 443 457 481 489 516 517 642"PermalinkCommentsvia:schneier random book humor math csc
Older Entries Creative Commons License Some rights reserved.