Lee Kelleher’s Weblog

random posts on code, .NET, Umbraco and WordPress

Posts Tagged ‘microsoft

Converting CSV to XML

with 4 comments

There’s a bit a functionality on one of the projects that I’m working on where I need to do a lookup. The data I’ve been given is in an Excel spreadsheet – which I needed to convert to XML (as ultimately the data will be stored in a CMS that handles XML better).

I’ve done a lot of projects where I need to convert XML to Excel (via CSV), but not many where I need to convert the other way.

I first saved the Excel as an “XML Spreadsheet” – which spat out all sorts of extra MS Office namespaces, styles, etc. Which is fine if I want to re-open the data in Excel. But I wanted the data to be cleaner (and more semantic).

I exported the Excel out as a CSV; then looked for a way to convert it to XML.

Then I found this very useful web-app tool: CSV to XML Converter by Creativyst

It did exactly what I needed! The tool has a 100Kb limit – which was great, because my CSV was 96Kb!

The outputted XML was around 450Kb – which got me thinking… if a lot of developers use that tool the way I did – then that’s a lot of load on their web-server! Maybe that’s where the new Google App Engine could come in handy?! They have the processing power and bandwidth to handle high usage!

I’d love to see other online text conversion utilities … you never know, maybe they could be all centralised on Google Apps?

Written by Lee Kelleher

April 14, 2008 at 4:07 pm

Vista SP1 Hibernation problems

with 3 comments

After a couple of unsuccessfully attempted to install Windows Vista Service Pack 1; it seems that I “forgot” to disable my anti-virus software! Then it installed fine.

Vista does seem to perform better/quicker since SP1, but, for me, it introduced a major show-stopper!

Hibernation stopped working!

I google’d the problem to see if anyone else had the same issue — and knew how to resolve it. It took me a while, probably because Vista SP1 is still “new” (officially), then I found the answer! [direct link]

Seems that there was an issue with the BCD – this doesn’t surprise me, as I do dual-boot with Ubuntu.

Here is the solution from the TechNet Vista SP1 forum:

1. Run CMD.EXE as administrator

2. Run the following command: bcdedit -enum all

Look for “Resume from Hibernate” in the output from the command above(example below):

Resume from Hibernate

---------------------

identifier {3d8d3081-33ac-11dc-9a41-806e6f6e6963}

device partition=C:

path \Windows\system32\winresume.exe

description Windows Vista (TM) Enterprise (recovered)

inherit {resumeloadersettings}

filedevice partition=C:

filepath \hiberfil.sys

pae Yes

debugoptionenabled No

3. Once you have found it, copy the value for identifier (in this example – {3d8d3081-33ac-11dc-9a41-806e6f6e6963})

4. Run the following command: bcdedit /deletevalue {3d8d3081-33ac-11dc-9a41-806e6f6e6963} inherit

5. Test hibernation.

This worked for me! Good luck with your Vista SP1 installation!

Written by Lee Kelleher

March 22, 2008 at 8:18 am

One Less Vista Woe

without comments

To follow up to my rant a few weeks ago (More Vista Woes on my old blog), it seems that Microsoft have taken note everyone’s complaints about the forced reboot.
After putting off my Windows Vista updates for as long as possible, I finally succumbed…

Once all the updates were installed, I’m prompted with the same “Restart your computer to finish installing important updates” message. But now the countdown timer is gone!!!

So at least I don’t need to worry as much when I go off to make a cup of tea again!

Written by Lee Kelleher

March 10, 2008 at 1:14 pm

Posted in blog

Tagged with , , , , , , ,