I am trying to figure out what programming language or combination of languages are need to accomplish this. I would like to have a simple excel sheet with 2 columns - "name" and "image url". Name | Image Url widget1 | http://www.widget1img.com widget2 | http://www.widget2img.com What I would like the program to do is to loop through the rows and Open the "image url" and automatically save the image as a .jpg extension with the name from the same row. Then have named images saved to a local folder (Ex. http://www.widget1img.com --> would be opened and saved as widget1.jpg to local folder). Anyone know of what language is required to accomplish this?
Python is also great with text processing, and if you are not some coder then Py is easier choice then Perl. If you never even wrote a line of code you could do it in one afternoon with Py. http://swaroopch.info/text/Byte_of_Python http://gnosis.cx/TPiP/
You can do it in PHP or Perl without using COM. If you want Perl example tell me, I just did the PHP one seeing I see people like to use that more often than Perl! PHP get the class from sourceforge sourceforge.net/project/downloading.php?groupname=phpexcelreader&filename=Spreadsheet_Excel_Reader.zip&use_mirror=superb-west Code (markup): Quick example using it! <?php // same image path $path = './images/'; // excel reader class require './reader.php'; // reader object $object = new Spreadsheet_Excel_Reader (); // out encoding type $object->setOutputEncoding ( 'UTF-8' ); // open the excel file for reading $object->read ( './urls.xls' ); // process the excel sheet foreach ( $object->sheets[0]['cells'] AS $row ) { /* * i am using... (for each row being read) * $row[0] = column number that holds the image name (IE: widget1) * $row[1] = column number that holds the image url (IE: http://www.widget2img.com/image.jpg) */ if ( false !== ( $image = file_get_contents ( $row[1] ) ) ) { $io = fopen ( $path . $row[0] . '.jpg', 'wb' ); fputs ( $io, $image ); fclose ( $io ); } } $object = null; exit (); ?> PHP: