Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Writing data to a closed WB

  Asked By: Ayden    Date: Jan 24    Category: MS Office    Views: 729
  

I am copying web data to a excel sheet which I want to transfer to
workbook to create a database file. These are financials of stocks. I
want to transfer the data of a stock to the database sheet. Suppose I
have copied data for stock "ABC" I will run the code and the data will
go to the database file (say located at c:\)Then I will copy data for
new stock code say "XYZ", and will run the code. THe data will go the
closed WB in a new sheet.

The sheets to be named from a cell say Cell A1 of the open WB ie which
I am using to import data from web.

How can this be done?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Dinh Tran     Answered On: Jan 24

Is there an actual database  file (e.g. MS Access file), or are you using an
Excel to hold your information? This is not clear from your explanation,
but I assume that there is no database file  as such?

It's also not clear why the functioning for ABC (which I assume you already
have) will be different from that for XYZ.

Is it that you don't know how to update an already existing Excel file?
Simply, you will need to open  it.

Your Application object has an Open method that will open an existing Excel
file. You can process this file in the same way you are presumably already
dealing with the file you created for ABC (i.e. add a new sheet  and put the
information into it). Then Save (not Save As) the workbook.

You have not given any idea of what your code  looks like for the ABC case,
so it's difficult to say more. Why not post the relevant parts of your
code.

 
Didn't find what you were looking for? Find more on Writing data to a closed WB Or get search suggestion and latest updates.




Tagged: