Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How would you start automating my job? - Part 2

(Followup to this question)

After surviving the first wave of incoming shipments (9 hours of copy/paste), I now believe I have all the requirements.

Here is the updated workflow:

  • Monkey collects email attachments (4 Excel spreadsheets, 1 PDF)
  • Monkey creates central database, does complex calculations (right now this is also an Excel spreadsheet)
  • Monkey sends data to two bosses, who set the retail prices independently; first one to reply wins
  • Monkey sends order form to our other warehouses, also Excel
  • Monkey sends spreadsheets to VIP customers, carefully sanitized and formatted (4 different discount categories)
  • Jurily enters the data into the accounting system. I've given up on automating this part, there's too much business logic involved, and the database is a pile of sh^W legacy

My question: What technologies would you use for a quick and dirty solution? I'm mostly sold on C#, but coming from a Linux/C++ background, I'm horribly confused about my choices in Microsoft-land.

For bonus points: How would you redesign the whole system from the ground up?

Clarification: I'm looking for basically anything that has the potential to get me reading the right things, just give me the keywords and a short description. Google will guide me from there.

P.S. in case you were wondering, my job title is System Administrator.

like image 917
György Andrasek Avatar asked May 14 '10 17:05

György Andrasek


2 Answers

You can interact with excel via Com Interop. See this article for how to do this with C#. This is an ugly solution in the sense that you must run it on a system that has Excel. You are not creating spreadsheets, you are programmatically telling Excel to create spreadsheets. This has its own advantages and disadvantages.

It's reasonably easy to create spreadsheets yourself (Excel can open spreadsheetml files), though this makes it tougher in some instances; the easiest way to generate an xls file is to tell Excel to save one (treating excel as a database is pretty easy too, but that doesn't give you access to all Excel functionality).

like image 171
Brian Avatar answered Oct 03 '22 06:10

Brian


C#. Linus may b nice, but let me assume you run windows in the company anyway. THe main problem will be (1) (the attachments, PDF) - anything you do here will rely on them having a specific form, and I bet there is a monkey on the other end sending them that rgegularly changes the layout ;)

Anyhow, I would go with C# 4.0 totally. Depending on what you use server side... i may even bypass excel and go exchange direct to read the emails.

like image 24
TomTom Avatar answered Oct 03 '22 04:10

TomTom