Francois Beaussier & Aymeric Gaurat Apelli

Thursday

Excel pictures :)

A lot of companies actually rely on spreadsheets for some of their business logic.

But that is not the only thing we can do with excel... have a look at theses geeky things:






I made a tiny c# to generate a text file that can be imported in excel :


StreamWriter sw = new StreamWriter("output.txt");
Bitmap src = (Bitmap) Image.FromFile("source.gif");

for (int x = 0; x < src.Width; x++)
{
for (int y = src.Height - 1; y >= 0; y--)
{
Color c = src.GetPixel(x, y);
sw.Write("{0};", (c.R + c.B + c.G) / 3);
}
sw.WriteLine();
}
sw.Close();



Your can then open the text file with Excel, set the import separator to ';'

You've got the data, all you now need is to use the excel graphic wizard to enjoy nice geek pictures :)

2 Comments:

  • what Excel graphic wizard?
    is it there with office XP?
    how can i run it?

    By Blogger Ghassan Karwchan, at 10:29 pm  

  • Hi ghassan,

    Yes the wizzard is in office XP :)

    You can run it by:

    - Using at little "chart" icon in the standart toolbar.
    - Using the Insert menu and choose Graphic

    enjoy ^^

    By Blogger Francois Beaussier, at 8:11 pm  

Post a Comment

<< Home