954,206 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

vb 6- exporting a database as an excel file in a tabular format(calendar form)

how can i export a database from access to excel but in a tabular form(calendar form)?tnx!!!

macy2323
Newbie Poster
4 posts since Oct 2007
Reputation Points: 10
Solved Threads: 0
 

I'm not sure what you mean by "calendar form". Since you haven't got any responses, maybe nobody else does either. I can tell you how to export a table to a spreadsheet so that the first row contains the field names of the table and each subsequent row contains the data in those fields. Is that what you want?

Hoppy

hopalongcassidy
Junior Poster
148 posts since Oct 2007
Reputation Points: 53
Solved Threads: 13
 

yes thats what i basically want. but is there any way that the title of each column in the table will be placed not on the first row but rather on the row above it(the first row where there are A,B,C...). thanks

macy2323
Newbie Poster
4 posts since Oct 2007
Reputation Points: 10
Solved Threads: 0
 

In Excel, the rows are designated by numbers (1, 2, 3, etc.) and the columns are designated by letters("A", "B", "C", etc.).

Anyhow, here's what you need:

Call DoCmd.TransferSpreadsheet( _
acExport, _
acSpreadsheetTypeExcel97, _
"NameOfTableOrQuery", _
"MySpreadSheet.xls")

You can find documention on TransferSpreadSheet by doing a Google search on Transferspreadsheet method". Click on the first link that comes up.

Hope this helps,

Hoppy

hopalongcassidy
Junior Poster
148 posts since Oct 2007
Reputation Points: 53
Solved Threads: 13
 

In Excel, you cannot change the value of A, B, C, .... which appear on top of each column.

yello
Light Poster
30 posts since Nov 2006
Reputation Points: 13
Solved Threads: 4
 
In Excel, you cannot change the value of A, B, C, .... which appear on top of each column.

I wasn't suggesting that. I was only asking if macy2323 wanted the field names in the table to appear as the first row of the spreadsheet.

As it turns out, after having looked the documentation, the boolean parameter that determines that is ignored when exporting a table to a spreadsheet. The first row of the spreadsheet will always be the field names.

Hoppy

hopalongcassidy
Junior Poster
148 posts since Oct 2007
Reputation Points: 53
Solved Threads: 13
 

You are right hopalongcassidy . I was just telling this to macy2323

yello
Light Poster
30 posts since Nov 2006
Reputation Points: 13
Solved Threads: 4
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You