Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
baileycat baileycat is offline
external usenet poster
 
Posts: 2
Default mail merge data source shows 2 tables

I'm using an excel file with one worksheet as my data source to merge to a
word document. First I select"Main document setup", then when I "Open Data
Source" and the excel file, I get a pop-up to select the table. 2 tables are
listed, both with the same name. Can you tell me why 2 tables are listed,
when there's only one worksheet in the excel file?
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default mail merge data source shows 2 tables

I can't say I know all the details, but at some point you have probably
defined either a database (or database filter), a list or some grouping in
your Excel sheet, or you may simply have set a print area.

When you open an Excel data source from Word 2002 or later, Word uses OLE DB
to get the data. The OLE DB provider lists a number of things in the
workbook as "tables" - e.g. worksheets and named ranges. When you define a
database, or set a print area, Excel actually creates a named range.

However, what the OLE DB provider actually sees also depends on whether the
workbook is actually open in Excel or not. For example, I have a workbook
here with a database defined in Sheet1. When it is open, and I use it as a
data source, OLE DB lists Sheet1$ and Sheet1$_FilterDatabase as "Tables". I
can use either of them as a data source. If I close the workbook then try to
use it as a data source, it lists Sheet1$ and Sheet1$_, and I can only
successfully connect to Sheet1$, not Sheet1$_. In essence, I think the
Sheet1$_FilterDatabase "object" is only really "there" because Excel
constructs it when it opens the workbook, but it leaves something in the
..xls file that looks like a "table name" when it closes the workbook.

--
Peter Jamieson
http://tips.pjmsn.me.uk

"baileycat" wrote in message
...
I'm using an excel file with one worksheet as my data source to merge to a
word document. First I select"Main document setup", then when I "Open
Data
Source" and the excel file, I get a pop-up to select the table. 2 tables
are
listed, both with the same name. Can you tell me why 2 tables are listed,
when there's only one worksheet in the excel file?


  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
baileycat baileycat is offline
external usenet poster
 
Posts: 2
Default mail merge data source shows 2 tables

Thanks Peter. Your example describes exactly the situation I encountered. I
am reassured to know it's 'just what happens'.

"Peter Jamieson" wrote:

I can't say I know all the details, but at some point you have probably
defined either a database (or database filter), a list or some grouping in
your Excel sheet, or you may simply have set a print area.

When you open an Excel data source from Word 2002 or later, Word uses OLE DB
to get the data. The OLE DB provider lists a number of things in the
workbook as "tables" - e.g. worksheets and named ranges. When you define a
database, or set a print area, Excel actually creates a named range.

However, what the OLE DB provider actually sees also depends on whether the
workbook is actually open in Excel or not. For example, I have a workbook
here with a database defined in Sheet1. When it is open, and I use it as a
data source, OLE DB lists Sheet1$ and Sheet1$_FilterDatabase as "Tables". I
can use either of them as a data source. If I close the workbook then try to
use it as a data source, it lists Sheet1$ and Sheet1$_, and I can only
successfully connect to Sheet1$, not Sheet1$_. In essence, I think the
Sheet1$_FilterDatabase "object" is only really "there" because Excel
constructs it when it opens the workbook, but it leaves something in the
..xls file that looks like a "table name" when it closes the workbook.

--
Peter Jamieson
http://tips.pjmsn.me.uk

"baileycat" wrote in message
...
I'm using an excel file with one worksheet as my data source to merge to a
word document. First I select"Main document setup", then when I "Open
Data
Source" and the excel file, I get a pop-up to select the table. 2 tables
are
listed, both with the same name. Can you tell me why 2 tables are listed,
when there's only one worksheet in the excel file?



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word mail merge "Unable to Obtain List of Tables from Data Source" Stephen Ford Mailmerge 10 February 11th 08 07:42 AM
word 2003 mail merge using foxpro 9 tables as a data source fails Daniel Williams Microsoft Word Help 16 January 31st 08 05:18 PM
How can I add data fields to a data source in Word Mail Merge? cd Mailmerge 2 November 7th 05 06:41 PM
How do I move data Colums within the data source of a mail merge hf Microsoft Word Help 1 July 5th 05 09:57 PM
data in mail merge letter being cut off - data source field size? tgone Mailmerge 1 May 20th 05 02:10 PM


All times are GMT +1. The time now is 03:15 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"