Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extracting Data from Excel Cells
#1
How do I grab data from a particular cell in Excel to a text file using VBScript?
Reply
#2
Wink 
Reply
#3
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
Thanks bfakruddin. Smile
Reply


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

Forum Jump:


Users browsing this thread: 1 Guest(s)