r/programmingrequests • u/_Tundr4_ • Jan 05 '19
Excel data to database - Open source project
The thing I see often at every place I've been working since i'm in IT industry, is people entering data in excel files. Then they ask you to develop a feature to do something with that data (reporting, filtering, publishing, etc).
The real solution is giving them the proper system for their need. The reality often makes it impossible to deploy something efficient (for many dark reasons), so you still have to deal with that.
The project I have is to make a system where a user can schedule importing jobs from excel to a specified tables in a specified database. I know! It already exist but I want to make it open source. Because why the heck not. There's a lot to code. I need your help to find the best way to do it and I don't know maybe code it a little with me.
The scheduling part I've been looking at Quartz.Net library. Trying to make it work as a service. Maybe I'm wrong. You'll tell me.
Then to extract data from those excel files, there are some libraries out there to do it. Don't need to invent hot water again.
Then there are lot of other things to consider but I'll wait to see what you think.
Sorry I don't have any code to show you. I'm just trying to figure out how I'm going to do it.
View all comments
Show parent comment
1
u/_Tundr4_ Jan 06 '19
Here's a flow of what you would have to set to create a "job".
File to import (xlsx, xls, xml, csv) ==>
Receiving table ==>
Fields mapping ==>
Import type ==>
Trigger ==>
So far I've been playing with Quartz.Net library. I'd use AdoJobStore to store the jobs/triggers in a database. Then a windows service would execute those jobs. https://www.quartz-scheduler.net/
I was thinking about using Linq To Excel ( https://github.com/paulyoder/LinqToExcel ) to extract excel files data. For other file format like XML or CSV, there are parsers included with .NET but I'm sure there are good parser out there that I don't know of yet.
For databases I'm not sure yet but I think it would be better to use each database system library separately. Really not sure.
Looking forward to see your suggestions :P