Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
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 | |
|
|
![]() |
||||
Thread | Forum | |||
Word mail merge "Unable to Obtain List of Tables from Data Source" | Mailmerge | |||
word 2003 mail merge using foxpro 9 tables as a data source fails | Microsoft Word Help | |||
How can I add data fields to a data source in Word Mail Merge? | Mailmerge | |||
How do I move data Colums within the data source of a mail merge | Microsoft Word Help | |||
data in mail merge letter being cut off - data source field size? | Mailmerge |