Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to export a series of different Access tables into a single Excel
worksheet with DoCmd.TransferSpreadsheet. The problem is positioning each table of data properly in the worksheet: there needs to be 40 rows between each table. I'm creating each table on the fly, then dumping it out to Excel like this: i = 10 For i = 1 To bytNumOfTables db.Execute ("DROP TABLE tblExcelData"), dbFailOnError db.Execute ("qryMakeNewTable"), dbFailOnError db.Execute ("qryPopulateExcelData"), dbFailOnError DoCmd.TransferSpreadsheet _ TransferType:=acExport, _ SpreadSheetType:=acSpreadsheetTypeExcel5, _ TableName:="tblExcelData", _ FileName:="C:\PathToWorkbook", _ HasFieldNames:=True, _ Range:="P" & i i = i + 40 Next So I'm expecting a contiguous block of rows and columns (about 15 rows and 20 columns) starting at P10, then another at P50, another at P90, and so on. To the left of each contiguous block will be a graph of the data. Am I specifying the Range parameter correctly? Why isn't Range:="P" & i working? Is there a better way to do this? Thanks in advance. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
TransferSpreadsheet to colored fields | Excel Worksheet Functions | |||
Access 2003: transferspreadsheet writes over existing spreadsheet | Excel Discussion (Misc queries) | |||
How do I Export range of row/column data to Access | Excel Discussion (Misc queries) | |||
export access to excel. change access & update excel at same time | Excel Discussion (Misc queries) | |||
how to rename sht after TransferSpreadsheet method? | Excel Programming |