title: Put the knife down and take a green herb, dude. |
descrip: One feller's views on the state of everyday computer science & its application (and now, OTHER STUFF) who isn't rich enough to shell out for www.myfreakinfirst-andlast-name.com Using 89% of the same design the blog had in 2001. |
FOR ENTERTAINMENT PURPOSES ONLY!!!
Back-up your data and, when you bike, always wear white. As an Amazon Associate, I earn from qualifying purchases. Affiliate links in green. |
|
x
MarkUpDown is the best Markdown editor for professionals on Windows 10. It includes two-pane live preview, in-app uploads to imgur for image hosting, and MultiMarkdown table support. Features you won't find anywhere else include...
You've wasted more than $15 of your time looking for a great Markdown editor. Stop looking. MarkUpDown is the app you're looking for. Learn more or head over to the 'Store now! |
|
Monday, January 05, 2015 | |
What? You're trying to open an html file with Excel that you just made from scratch [with another app]? Why would you do that? Well, for one, this seems to be the preferred way to use PowerShell to make Excel files when you want to control colors and other UI-specific information along with data. It's kind of strange that, when one of PowerShell's most useful group of functions is centered around creating and manipulating CSV files, you wouldn't have similar modules for Excel, but fine (Scripting Guy says it's because of Excel's heavy use of COM [1]). So you get a nice html template, you have PowerShell data-i-fy it all up, you go to Excel to open it, and then BAM. "You are attempting to open a file type (Web Pages and Excel 2003 XML Spreadsheets) that has been blocked by your File Block settings in the Trust Center." Wait, what? The Trust Center? I mean, I understand when I have to Unblock-File on ps files I've sourced from the Net, but an html file I created (yes, "all by myself") in SeaMonkey [sic]? RLY, Excel? You can follow the instructions and wade into your Trust Center to say, "Forget it. I want Excel to open ANY html file, whether I created it or not, in spite of the fact that you could've just checked to see if I'd created it and only stopped me if things were much more suspicious." Or you can try to do that and find your company's IT dept has made it impossible to change your Trust Center settings even though you have admin access for nearly anything else. Well, if you find you're in the second group (the one with not exactly consistently enforced IT security policies) there's a workaround: Put your html file that you want Excel to open in a "trusted location". Who knew? Good thing the bad guys will never learn where the locations are and exploit this extra trust. Here's a list of Trusted Locations for Excel 2010 -- a list that will look like crud until I monospace it (sauce: [3]):
If you're not using 2010 or are looking for something similar for Word, etc, that info is here: http://support.microsoft.com/kb/922849 And voila. Look at that html file you painstakingly created and filled with data, now mangled beyond belief by that bastion of spreadsheet integrity, Excel! You're welcome. ;^) [1] http://blogs.technet.com/b/heyscriptingguy/archive/2014/01/10/powershell-and-excel-fast-safe-and-reliable.aspx [2] http://technet.microsoft.com/en-us/library/hh849924.aspx [3] http://technet.microsoft.com/en-us/library/cc179039(office.14).aspx Labels: excel, powershell posted by ruffin at 1/05/2015 01:11:00 PM |
|
| |
All posts can be accessed here: Just the last year o' posts: |
||||||||||||||||||||||
|