Notepad Visual Basic and Excel
The "Scripting.FileSystemObject" is part of the scripting runtime libraries
and should be present on all but ancient PCs running Microsoft Windows.
With it, you can read a text file in its entirety or line by line and assign
the text read to string variables. There are a number of VBA functions you
can use to break down the text (for example, only extract text between a set
of markers) before placing it in worksheet cells or doing something else
with it.
You ask "How would I go about having the script copy
information without first knowing where the information is?"
How do you know where the information is now? Whether you're doing the copy
and paste manually or having a VBA routine do it, you must have some way to
locate the text file and then locate the needed text within that file.
Steve Yandl
I use Office Pro 2003 while others may still be using earlier versions
of the Excel. Would the FSO still allow this spreadsheet to be
backwards compatible? How would I go about having the script copy
information without first knowing where the information is?
The way I was trained to use the system was to use the notepad to
'copy' the info to be loaded into the spread sheet. The website only
allows information download with an export with certain fields of
information. The file is downloaded and saved on the users computer,
which changes the file name each time it is downloaded, and then using
notepad to open the file, select all, and copy all the data with a
right click, and then click on a button on the worksheet of the
spreadsheet with a macro to paste the information into spreadsheet.
The information is then placed into necessary cells of the spreadsheet
by excel commands like ='worksheet1'!C9.
The typo errors seems plausible, but I still wonder why it would leave
out characters as well as change them.
|