Adding Data to Existing Data in Excel

  • Thread starter Thread starter Tamer Seoud
  • Start date Start date
T

Tamer Seoud

Hi,
I'm developing a user interface for running reports. One
of the hyperlinks on the user interface should open a
query and output it to Excel - Till here I have no
problems-.
What I want is,instead of overriding the data in the Excel
file, I want the data generated from the query this time
to be added to the old data that was saved from the last
time. Please advise.

Thanks a million,
Tamer
 
You'll have to define "Added To"

Are you talking about placing the new data on another tab, performing a
mathmatical addition(1+2=3), or other?


--
HTH,

Steve Clark, Access MVP
FMS, Inc.
Professional Solutions Group
http://www.FMSInc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Is your Access database too slow?
Are you ready to upgrade to SQL Server?
Contact us for optimization and/or upsizing!
http://www.FMSInc.com/consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
Thank you for your reply. I'm talking about placing new
data either on another worksheet in the same excel file or
in the same worksheet cumulatively after the old data. It
will be very helpful to know both.

Thanks.
 
Append data to existing sheet:

INSERT INTO
[Excel 8.0;database=C:\MyWorkbook.xls].[Sheet2$]
SELECT KeyCol AS MyKeyColumn,ValueCol AS MyDataColumn
FROM MyTable

Create new sheet using data:

SELECT KeyCol AS MyKeyColumn,ValueCol AS MyDataColumn
INTO [Excel 8.0;database=C:\MyWorkbook.xls].MyNewSheet
FROM MyTable

--
 
Back
Top