I'm writing a program for my client in C# Winform. And the client gave this excel sheet.


I have a table that used to calculate BULK amount of alcohol by "DIP" and "SLIDE". In excel I need to select the specific DIP and SLIDE to get the BULK. I need to do the same thing in the database.

I exported a table from excel to MySQL table. excel sheet table in database

I can get the BULK amount by this query

SELECT SLIDE 0.8 FROM tbl_vat_01_alcohol_esa WHERE DIP = 212;


I need to get the DIP and/or SLIDE when I enter BULK amount. I wanna know how to do it? or Is it possible to do that kind of work in this table? or do I need to change the table structure or something.


How to access the excel sheet from C# winform. I mean, If I make a form that contain 3 textbox for DIP, SLIDE and BULK. When I enter DIP and SLIDE I get BULK and when I enter BULK I get DIP and SLIDE...

Is it possible? If it is, How to achieve that? OR Is there any other method.

I'm new to StackExchange and Database!

closed as unclear what you're asking by mustaccio, MDCCL, Marcello Miorelli, Tom V, Gaius Jul 6 at 20:50

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    start with connecting to the mysql server here and get the row/s using the select query you have in the post – tttony Jul 4 at 21:09

what you have is a cross-table you need to uncross it.

create a table with three columns bulk,dip,and slide, put each cell of the excel table into a row of this table.

then you can query like

select bulk from bdstable where slide=0.8 and dip=212

  • thank you for the respond. your answer looks promising. But, what about using the excel file instead of creating table in database? Can I read the cell value using c#? I only need to read the values, not to update or something. – inD4MNL4T0R Jul 5 at 10:07
  • off topic in on this stack exchange, ask on stack overflow about how to do OLE – Jasen Jul 6 at 0:54
  • Will do. Thank you sir... – inD4MNL4T0R Jul 6 at 6:20
  • Sorry for late. 1st of all, I didn't know what kind of table is that. I mean the name. And I searched for 'how to convert cross table to list table' Then I found this 'AWESOME' Add-In for Excel called 'KUTOOL' This Add-In saved my time. My excel sheet has hundreds of data, I can't make one by one. Thank you SO MUCH @Jasen. – inD4MNL4T0R Jul 6 at 16:05

Not the answer you're looking for? Browse other questions tagged or ask your own question.