Excel: MrExcel's Learn Excel #891 - AC DC Video

You've probably seen the AC/DC video running in an Excel spreadsheet. The author did some cool tricks to deliver the WAV file to your hard drive. In Episode ...

Transcript of the video:

Hey, welcome back to the MrExcel netcast, I'm Bill Jelen. What you probably see in this ACDC video in Excel-- it's one of the hot things going around on the internet right now. You can find it at acdcrocks.com/excel/ And it's pretty cool, it's put together by a guy from London named Phil. I talked to Phil and what I'm really fascinated about here, is not the graphics or anything; Phil has figured out something very, very clever that we all might be able to take advantage of.

Here in this Excel file, there is an embedded object where you actually put the music from the video. And let's go take a look at Phil's code-- he's nice enough to leave it all unprotected back here. I'm going to go to the code called FileExtractor-- this, I thought, was absolutely brilliant.

And what Phil starts to do here is, he starts to read a file, okay? And when we go to figure out which file he's reading, he's reading ThisWorkbook.Path, and Application.PathSeparator, and ThisWorkbook.Name. Well, think about that: He's reading the very Excel file that the code is running in. That's amazing. And he starts to read it, basically going through one bit at a time, and when he finally finds a certain code, &H52, Phil figured out that that's the marker saying, "Hey, this is where that embedded WAV file is in the Excel file.” So, at that point, he starts to take that data and load it into a big array and, sure enough, writes it out to the hard drive.

Now, this seems a little bit virus-like-- there it is right there-- but it really seems to be a clever way to deliver something to a client. If you need to make sure that they have a certain text file, or a certain this, or a certain that. you can actually embed it right in the Excel file.

And very clever code here, from Phil-- it actually goes through, reads the workbook, not as a workbook but just as a binary file, and when it finds that marker, then starts to write it out. A brilliant piece of coding back there. So whether you're into coding and need to deliver something, kind of, in a clandestine fashion; or you just want to see the world's first music video in Excel; go check out acdcrocks.com/excel. Amazing little Excel workbook.

Hey, thanks for stopping by, we'll see you next time for another netcast from MrExcel.

Keywords for this video: Microsoft, Excel, business, accounting, spreadsheets, tutorial, technology, MrExcel, Macro, VBA

This video is current as of January 5, 2009

For more resources for Microsoft Excel