.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

Read excel column value

Posted By: Naresh     Posted Date: September 09, 2010    Points:2   Category :ASP.Net
Hi ALL,

i uploading excel file to databse.Excel column value is combination is text and time,i need to extract only time.Each column will have different value.
One column value will be _immediate 15:00 - 9:00,another excel column value will be CKA 09:30 - 18:30,another value EMAIL 12:00 - 22:30 and so on.

I need to extract only time i.e 15:00 - 9:00 and split that time into two parts store it in 2 different variables.
How to trancate text in column value.
TimeIn - 15:00
TimeOut - 9:00

Responses
Author: Deco             
Posted Date: September 12, 2010     Points: 5   

you can refer the below link to read the column in an excel file

http://www.codeproject.com/KB/cs/Excel_Application_in_C_.aspx

after that you can use split strings to get the timein and timeout value.

string str = "15:00 - 9:00";
string[] split = str.Split('-');
string timein = split[0].Trim();
string timeout = split[1].Trim();


Regards,
Deco


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend