syedmeesamali

Member
Joined
Jan 16, 2020
Messages
19
Programming Experience
5-10
Hi All. I am working on a project where I need to carry out below steps.
1. Import data from Excel and display using datagridview
2. Create local database in the application - Windows .Net form application
3. Convert the loaded data into SQL format (SQL readable format)
4. Store the data in local database
5. Create various reports based on data in local database.

For steps 2-5 above I have no issues and have already sorted them out. Step-1 is done as well but I have following problem.

How do I take data input from particular fields in my input sheet (excel file) and map them to the final target SQL database?
I have attached photo showing example of invoice with data to be input from various fields.
Any help / guidance much appreciated.
sample.png
 

Sheepings

Senior Programmer
Staff member
Joined
Sep 5, 2018
Messages
1,636
Location
UK
Programming Experience
10+
Your question is to broad. Can you simplify it by perhaps asking direct questions in increments of steps and perhaps showing what you've tried may encourage others to assist you. I doubt anyone is going to write this out for you, without seeing what you've attempted, thought of or considered.

First start off by writing a class responsible for accumulating the headers column such as Codics etc, and create the structure before trying to cipher out the data.
 

Skydiver

Staff member
Joined
Apr 6, 2019
Messages
1,911
Location
Chesapeake, VA
Programming Experience
10+
2. Create local database in the application - Windows .Net form application
You may want to re-think this. WinForms is at EOL. It may have gotten a little extra boost with .NET Core 3.0 porting parts of WinForms, but as you'll note, in .NET Core 3.1, they deprecated a whole bunch of stuff. Only .NET Core 3.1 is considered long term support.
 

syedmeesamali

Member
Joined
Jan 16, 2020
Messages
19
Programming Experience
5-10
Your question is to broad. Can you simplify it by perhaps asking direct questions in increments of steps and perhaps showing what you've tried may encourage others to assist you. I doubt anyone is going to write this out for you, without seeing what you've attempted, thought of or considered.

First start off by writing a class responsible for accumulating the headers column such as Codics etc, and create the structure before trying to cipher out the data.
Apologies for such a broad question but actually I never worked with Excel import so wanted some head start. With some googling I got some ideas and will try to develop initial input processing module to handle input data. Then if i got some issues will come back here. But what I've seen in general there isn't a strong Excel input support without external packages. I hope my invoice won't be a big headache.
 

syedmeesamali

Member
Joined
Jan 16, 2020
Messages
19
Programming Experience
5-10
You may want to re-think this. WinForms is at EOL. It may have gotten a little extra boost with .NET Core 3.0 porting parts of WinForms, but as you'll note, in .NET Core 3.1, they deprecated a whole bunch of stuff. Only .NET Core 3.1 is considered long term support.
Thanks for suggestion. Should I immediately move to WPF? I am still in initial stages and it's not a huge project to make changes.
 

Sheepings

Senior Programmer
Staff member
Joined
Sep 5, 2018
Messages
1,636
Location
UK
Programming Experience
10+
Yes, as Skydiver has already pointed out, Winforms has seen better days. I encourage most devs these days to use WPF where ever possible no matter how small the project may be.

Are you familiar with MVVM?
Are you also familiar with data binding and WPF in general?

If not, you will notice that there are a variety of things in Winforms which will not work in WPF right out of the box, and you will find there are a lot of different code variations that wont work regarding how things are done in Winforms, compared to WPF, such as using dispatcher, task, invoke etc. Anyway, post what you have from WPF, and we can advise you further if you still need help. And remember to use code tags when posting to the forums.
 
Top Bottom