By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,687 Members | 2,028 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,687 IT Pros & Developers. It's quick & easy.

Extract data from excel and update oracle database using c#

P: 2
Hi All,

I'm very new to C# and ASP and I am asking for some help as I don't really know where to start on this project.

Some background info first

I run a report each week which outputs data to an excel spreadsheet, I then have to manually do insert and update query's to our oracle database using this spreadsheet.

I would like to create an application that would read the data form the spreadsheet and automatically update the database.

The spread sheet data is such..

clientid.....CDB.....NatID...........System....... ...Result.........Error
75......................L83118.....iSoft Synergy..........Y
81............465....H83019.....EMIS LV.................Y
84............625....L84001.....EMIS LV................N1..........Population QOF - Preliminary report.APPERMxxx needs re-running
100..........816....B82004.....EMIS LV.................Y
101..........825....L84080.....EMIS LV.................Y
102..........826...L84078......EMIS LV................N1..........Population QOF - Preliminary report.APPERMxxx needs re-running
103..................B86043.....iSoft Premiere..........C

I want to read the data line for line, when it comes across a 'N1' in the Results column I need to do an insert query using the NatID, Result and Error. Once the query is run it would then carry on searching for the next 'N1'.

Is this possible to do.

Thank you all very much for you help in advance.

Ken
Oct 19 '07 #1
Share this Question
Share on Google+
1 Reply


kenobewan
Expert 2.5K+
P: 4,871
This is possible do, I suggest using ado.net:
Reading and Writing Excel Spreadsheets Using ADO.NET C# DbProviderFactory
Oct 21 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.