Export to set Cells on a Excel Template

  • Thread starter Thread starter jln via AccessMonster.com
  • Start date Start date
J

jln via AccessMonster.com

What i have is a query that needs to export to a template that I have set up.
I need each field in the query to go to a set Cell on the template. What is
the best way to do this?
 
hi,
What i have is a query that needs to export to a template that I have set up.
I need each field in the query to go to a set Cell on the template. What is
the best way to do this?
Excel automation, e.g.

Dim ap As Object

Set ap = CreateObject("Excel.Application")

ap.Visible = True
ap.Workbooks.Add

ap.Range("A1").FormulaR1C1 = "HEADLINE"
ap.Range("A1").EntireRow.Font.Bold = True

ap.Range("C1").FormulaR1C1 = "4/18/2006"
ap.Range("C1").NumberFormat = "dd/mm/yy"
ap.Range("A3").FormulaR1C1 = "sdfsf"
ap.Range("B3").FormulaR1C1 = "dgfdg"
ap.Range("C3").FormulaR1C1 = "DFGFG"

See also

<http://msdn2.microsoft.com/en-us/library/aa272267(office.11).aspx>


mfG
--> stefan <--
 
Thanks Just what i needed.


Stefan said:
hi,

Excel automation, e.g.

Dim ap As Object

Set ap = CreateObject("Excel.Application")

ap.Visible = True
ap.Workbooks.Add

ap.Range("A1").FormulaR1C1 = "HEADLINE"
ap.Range("A1").EntireRow.Font.Bold = True

ap.Range("C1").FormulaR1C1 = "4/18/2006"
ap.Range("C1").NumberFormat = "dd/mm/yy"
ap.Range("A3").FormulaR1C1 = "sdfsf"
ap.Range("B3").FormulaR1C1 = "dgfdg"
ap.Range("C3").FormulaR1C1 = "DFGFG"

See also

<http://msdn2.microsoft.com/en-us/library/aa272267(office.11).aspx>

mfG
--> stefan <--
 
Back
Top