Thread: [Solved] insert database as field
View Single Post
 
Old 03-05-2014, 05:49 PM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Try something along the lines of:

{DATABASE \d "C:\\Statement\\Datasource.xlsx" \s "SELECT [Client Billing Document Number] AS [No Doc], FORMAT([Invoice Date], \"dd/MM/yyyy\") AS [Fecha Doc], FORMAT([Due Date], \"dd/MM/yyyy\") AS [Vencimiento], FORMAT([Client Document Currency Balance], \"##,###,##0.00\") AS [Importe], [Client Document Currency] AS [Moneda] FROM [Data$] WHERE [Debtor Number] = \"50010117\" ORDER BY [Invoice Date], [Due Date]" \l "37" \b "51" \h}

Depending on how your data are defined, you may also need to change [Data$] to [Data\$].
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote