473,395 Members | 1,568 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

how to keep query design properties when export it into Excel?

hi all,

I'm trying to export a query by calling:
Expand|Select|Wrap|Line Numbers
  1.  DoCmd.TransferSpreadsheet(acExport, , [Queryname], [FileName], True) 
but the excel design is different from how to query's looks like.
for example, my query sheet direction is from right-to-left
but in the excel file it's from left-to-right.

how can I preserve my design settings in the excel file?

thanks,
Aug 2 '11 #1
4 2338
Narender Sagar
189 100+
Hi Levy,
I understand it as you want tokeep same formatting in excel while exporting data from query.
Can you tell us which version of Access you are using. if you are using Access 2007 or Access 2010, then at the time of exporting, wizard will show you a window wherein you can choose options of "Export data with formatting and layout"
Aug 3 '11 #2
Thanks Narender Sagar for reply,
you got it right, I want to export my query in the same format, as I see it in the access windows.
sorry that I didn't mention it before, Im using Access 2007.
but keep it in mind that Im using DoCmd.TransferSpreadsheet method (using VBA/Access script) to export the query, I cannot use any wizard or something GUI-ly.
but if there any setting option that need to be tick or change I will be glad to know...

thanks,
Aug 3 '11 #3
Narender Sagar
189 100+
Open the desired query, and then over Ribbon you'll find "External Data". Go to External Data and under "Export" you will find Export to Excel Button quite prominently. If you are unable to find above then probably you need to check service pack for your office 2007 from Microsoft (Because I remember, in previous version of Office 2007, this feature was missing.)
Ref. following link : http://support.microsoft.com/kb/934833
"Unless you install the Office 2007 suite Service Pack 2, you cannot export a report to an Excel format in Access 2007"
Aug 3 '11 #4
thank you for your reply,
but it seems you didn't get my question...I'll try to make it more clear - I don't want to use any GUI to export my query, I want to only use the DoCmd.TransferSpreadsheet method, and still keep the query's display settings (as you post it earlier).
I don't know how to do it...
I hope it's more clear now..

thanks,
Aug 8 '11 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: hifchan | last post by:
I'd like to add the following settings for my exported Excel file: - some columns as Freeze pane - orientation - printing order MS Office has the following settings can be added into the header...
7
by: Jean | last post by:
Hello, I have a form that performs a search, according to criteria that a user enters into the text boxes. When the user clicks on „Search", a SQL string (say strSQL) is built up with the...
0
by: siLver | last post by:
Hi.. I'm trying to export to excel.. using: Response.ContentType = "application/vnd.ms-excel" Response.AddHeader "Content-disposition", "attachment;filename=" & sFileName Response.AddHeader...
3
by: yovation | last post by:
Hi, I have a 3 table database. 1 parent 1 child 1 child of child I would like to get the data into excel as 1 sheet (similar to a grouped report).
0
by: thaiwhere | last post by:
Hi all, pls help me about this problem. I have a code below: (I want to export data of grid to Excel) //************************************************** myDataGrid.DataSource =...
0
by: SupaDaveXP | last post by:
Helllo everyone. I am attempting to export tables from SQL v.8.x to Excel via DTS, but only one row is being created in Excel. Below is the query and the results shown in SQL Analyzer. Only the...
0
VietPP
by: VietPP | last post by:
Hi all, I've asked too much question in this day, hehe. I'm trying to export my table data in OracleDB to excel. The problem is my charset in database is US7ACSII (using Vietnamese font), when...
3
by: Cdude | last post by:
I need to export into excel but not into a new worksheet each time.I want to add the exported dataset onto an existing spreadsheet that already has rows on it. I may have not written this to well....
2
by: sbettadpur | last post by:
hello, i want to export reports into excel file, i got some class files which will export into excel file. Now i need to change the font size, font should be in bold. how i can do that one.
1
by: mei2523 | last post by:
I've got a query that contains a field called "URL", that field is a hyperlink field. I've got these super long hyperlinks in this field for different records, and for some reason, when I export...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.