Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
reading data from CVS file
#2
Solved: 11 Years, 8 Months, 3 Weeks ago
Hi,

You can store the value in a string i.e.,
Code:
Step 1:Set objExcel = CreateObject("Excel.Application")
Step 2:Set objWorkbook = objExcel.WorkBooks.Open("D:\TestData.xls")
Step 3:Set objDriverSheet = objWorkbook.Worksheets("Sheet1")
If Cell A1 stores the value = "A","B","C", "D"
Step 4: datataken = objDriverSheet.Cells(1, "A").value
Now  datataken will store "A","B","C", "D"
split this text with split function in vb as
Step 5: dataarray = split(datataken,",",-1)
Step 6:Var1= dataarray(0)
Step 7:Var1= dataarray(1)
Step 8:Var1= dataarray(2)
Step 9:Var1= dataarray(3)
That's it .. this code will definitely work
Reply


Messages In This Thread
reading data from CVS file - by Brian - 04-04-2008, 11:22 AM
RE: reading data from CVS file - by kamalteja - 04-04-2008, 01:08 PM
RE: reading data from CVS file - by Brian - 04-06-2008, 05:05 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Reading Global Sheet's DataTable Value Bhuvana 0 1,789 01-05-2020, 10:03 PM
Last Post: Bhuvana
  Reading Value from Java Table arjun.singh 8 24,993 10-11-2017, 02:51 PM
Last Post: sivaji
  dtLocalSheet empty even though excel file contains data cantorre 2 2,620 05-10-2017, 12:47 PM
Last Post: vidhi
  Reading data from excel sheet serenediva 1 9,984 03-03-2017, 10:07 AM
Last Post: vinod123
  Grab multiple line data from log file haziqwebs 0 1,888 10-19-2016, 01:28 PM
Last Post: haziqwebs

Forum Jump:


Users browsing this thread: