Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extracting Data from Excel Cells
#1
Solved: 10 Years, 8 Months, 4 Weeks ago
How do I grab data from a particular cell in Excel to a text file using VBScript?
Reply
#2
Solved: 10 Years, 8 Months, 4 Weeks ago Wink 
hi, bjotorres
Here is example of code how to Read From Excel File.
Here is example of code how to Write to a File.
How to work with Microsoft Excel Objects you can read here.

Hope this will help you Smile
Reply
#3
Solved: 10 Years, 8 Months, 4 Weeks ago
Code:
Function excel()
dim xl

set xl=createobject("excel.application")
xl.visible=true
xl.workbooks.open "path of file .xls"
xl.sheets("sheetid").select

excel=xl.cells(row,column).value
print excel

xl.activeworkbook.save
xl.quit
set xl=nothing
End Function

Call excel()
msgbox excel

Function TextFile(excel)
dim fso,fs

set fso=createobject("scripting.filesystemobject")
set fs=fso.createtextfile("path of file.txt",true)

fs.writeline excel

fs.close

set fs=nothing
set fso=nothing
End Function

print excel
Call TextFile(excel)
Reply
#4
Solved: 10 Years, 8 Months, 4 Weeks ago
Thanks bfakruddin. Smile
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Extracting Email Body from Outlook waseem.khan.91 0 1,895 03-04-2019, 02:53 PM
Last Post: waseem.khan.91
  Extracting Email Body from Outlook waseem.khan.91 0 1,033 03-01-2019, 02:51 PM
Last Post: waseem.khan.91
  How to identify controls embedded within WinListView cells Devesh Thakur 5 2,320 04-19-2018, 10:56 AM
Last Post: Devesh Thakur
  Search and import data from excel under some rules. nwpulele 2 2,754 02-19-2015, 04:10 AM
Last Post: supputuri
  DataGridTemplateColumn's cells cannot be edited... asaf_bitton 3 3,529 10-02-2014, 05:36 PM
Last Post: krupaluk

Forum Jump:


Users browsing this thread: 1 Guest(s)