Wednesday, August 24, 2011

Constraints leads to better expertise

A person whom I know well is working in a company where PHP is the primary tool. He has to transfer an Excel file which contains 600 records to a Drupal based application where MySQL is the DB backend

This person sought my help in getting a suggestion for automation.

I did following things

           a ) Showed how Excel can be automated from C# using COM interop
           b ) Showed How Excel Object model can be navigated to retrieve the data
           c ) Did download the MYSQL connector for .NET
           d ) Wrote a Small Console program which uses MYSQL connector for .net ( using C# )
          
Then came a startling discovery that the company do not have Visual Studio installation. I asked the person to export the excel file as a MSDOS based CSV file. Then , I explored various options for CSV parsing and I was amazed to find some kind of native support for CSV parsing in PHP. Used PHP database API to populate the MYSQL database.

Using mono for windows , I did show him how the C# program written can compile and run the program which was using Visual studio.

In the end , It was a nice lesson on C#/.NET , PHP csv parsing , PHP mysql database api , Excel object model , way to use TLBIMP library etc.


2 comments:

goutham v said...

I think it was easy since it was 600 records, php might hit performance problem, if the record count goes up.

Arthritis Leads said...

We are able to generate many types of Arthritis Leads and Diabetes Leads through true and tried methods that produce quality leads.