I have an excel file that i managed to perform some calculation.It's to know the asset value of bridges in a current year.I have 21 fields in the file.Out of the 21 fields,seven fields are just information about the bridge,the rest are used for the calculation based on various conditions.And i have more than 500 records.

Now i wanted to do the same thing using vb.net if it's possible.
1.Read certain fields and store them in the database.(Fields holding bridge information).
2.Read the rest of the fields while performing calculation and lastly store them.

Is there an article or resource to refer to that mentions the same idea? Since most of the articles in the web only show that you can just import data from excel to a database.

Recommended Answers

All 4 Replies

Databases hold data, thats all there is to it. If I understand you correctly you want to add values to a form or program, run the calculations and save the results.
If thats true, the vb code will be responsible for performing the calculations and then it passes the results to the database to store.
SO, you're not talking about a straight import of data from one to the other. You need to include a transformation step.
Does that help?

Is that not possible?

Sorry, is what not possible?
Do you want to export a spreadsheet immediately into a database, with no intermediate step? If you want to carry out calculations on the data you will need code somewhere.

Hi Hericles,my idea was the same as you said.I mis-read your reply.I stored the spreeadsheet data on a data table first.And then perform the calculation on a row and column basis using a for loop.But now i wanted to show the progress of the importing process using a progress bar and a label.The progress bar is located on another form.My idea was to inform a user on a record basis.The label displays "importing 1 of 100",where 1 increments and 100 is the records in the datatable.But i couldn't achieve that since it's on another form.How can i do that?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.