Export query to Excel with formated heading

When export from query to Excel, I'd like to turn some columns into heading 
row on top of Excel sheets  how to turn this:

LastName FirstName SID  Section Instructor
Doe      John      1234 0545    Su
Doe      Jane      2345 0545    Su

into this?

Class Roster
Instructor: Su
Section: 0545

LastName FirstName SID
Doe      John      1234
Doe      Jane      2345
 

0
Song
11/29/2009 5:06:29 PM
access.queries 6343 articles. 1 followers. Follow

2 Replies
1565 Views

Similar Articles

[PageSpeed] 30

I think one way of achieving this would be to create  a report in Access 
where you would group under instructor with the students in the detail 
section.  From the report you can then use the analyze with Excel function 
to export it Excel.

Other methods may be more complex or need some code to achieve the result.

Hope it helps.

Hennie

"Song Su" <songsu@live.com> wrote in message 
news:AE3A651C-A8FD-41BC-BB45-6DA24F29E701@microsoft.com...
> When export from query to Excel, I'd like to turn some columns into 
> heading row on top of Excel sheets  how to turn this:
>
> LastName FirstName SID  Section Instructor
> Doe      John      1234 0545    Su
> Doe      Jane      2345 0545    Su
>
> into this?
>
> Class Roster
> Instructor: Su
> Section: 0545
>
> LastName FirstName SID
> Doe      John      1234
> Doe      Jane      2345
>
> 
0
hennie
12/2/2009 1:14:24 AM
Hi, Hennie:

I think you mean 'export to excel' which can only export detail band of 
report, not header. I'd like to hear your 'other methods'. Or is it possible 
to achieve this from Excel side (link to Access query) instead of Access 
side?

Thanks

Song

"hennie" <co@hotmail.com> wrote in message 
news:MbjRm.48646$X01.15933@newsfe07.iad...
> I think one way of achieving this would be to create  a report in Access 
> where you would group under instructor with the students in the detail 
> section.  From the report you can then use the analyze with Excel function 
> to export it Excel.
>
> Other methods may be more complex or need some code to achieve the result.
>
> Hope it helps.
>
> Hennie
>
> "Song Su" <songsu@live.com> wrote in message 
> news:AE3A651C-A8FD-41BC-BB45-6DA24F29E701@microsoft.com...
>> When export from query to Excel, I'd like to turn some columns into 
>> heading row on top of Excel sheets  how to turn this:
>>
>> LastName FirstName SID  Section Instructor
>> Doe      John      1234 0545    Su
>> Doe      Jane      2345 0545    Su
>>
>> into this?
>>
>> Class Roster
>> Instructor: Su
>> Section: 0545
>>
>> LastName FirstName SID
>> Doe      John      1234
>> Doe      Jane      2345
>>
>> 
0
Song
12/2/2009 3:07:43 PM
Reply:

Similar Artilces:

Print an Excel document directly without starting Excel
Hello I like to print an Excel-sheet directly. The sheet is an phone-list, and has to be printed directly, so that bad- schooled users can use that button too. I guess that there are some parameters or so that send a document directly to the default printer. Straingely I can't find them anywhere. Greetings, Pieter Palsma Pieter If you find the file in Windows Explorer, for example, you can right-click on it and print it from there. This opens Excel, loads the workbook, prints it and then closes Excel. Andy "Pieter Palsma" <pieter.palsma@corusgroup.com> wrote in mes...

Custom Format time to arc
I'm trying to find a symbol to Format/Cells/Custom, a symbol that represents the max value of 360�. I know "H" is equal to the max value of 24 hours, "m" is equal to sixty minuets and "s" is equal to sixty seconds, this [h] will roll hours over past 24, and I know to format cells like this h� m' s.00\" but these symbols represent time not the arc of 360�. I want to convert arc to time and time to arc with the symbols in costum format, I don't think this is possible, is it? Am I doing this backwards? Should I be working with a formula or a combina...

Formating Bars based on the value of a bar
I have created a bar chart in an access report. I want the bars to change color based on the value of the specific bar. For example, if the value of a bar is less than 1, it is red, if it is between 1 and 5, it is yellow, if it is greater than 5 it is green. How can I do this? Seems like an easy problem, but I've just spent a couple of hours playing with this and I can't make it work. The problem is that the Value property of the points in the SeriesCollection is not exposed in the VBA interface. It certainly exists (eg. with the chart in design mode, if you hover the mouse...

Conditional Formatting 03-29-07
H Everyone, I have been playing around with conditional formatting. I Have a few text boxes with shading if certain items are entered. Now I want the first 3 fields in my subforms to be shaded if a record is started. I can get the shading to work but I have the next record showing below the current record that is entered. Those fields are also shaded, I only want them to shade if there is anything entered in any of those 3 fields. Is there a wild card to use so if anything is entered so the other 3 fields will shade? Thanks, Linda Linda, I am not 100% sure I understand what y...

A Date Query
I need to create a formula which can do the following: IF the end date (S2) is greater than than 12/31/05, AND the start date (R2) is less than 12/31/05 then...(and I know the formula for here). Any ideas? Thanks? Sam B -- SamuelT ------------------------------------------------------------------------ SamuelT's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=27501 View this thread: http://www.excelforum.com/showthread.php?threadid=475036 try this: =IF(AND(S2>DATE(2005,12,31),R2<DATE(2005,12,31)),IF TRUE,IF FALSE) Good Luck -- swatsp0p -------...

Embed Excel Spreadsheet in Word ?
I have created a Gantt Chart with Excel. I would like to embed that spreadsheet in Word for a report. I have used "Paste Special" --> "MS Excel Object" However, there is 2 problems 1) Part of the Excel Spreadsheet is not shown in Word (Even though I have chosen A3 as paper size for the Word Document). Is there any way to include the whole spreadsheet ? 2) Is it possible to paste in such a way that the gridlines are shown ? (Like the one that I print with gridline shown) Your advice is sought. Peter It depends on the size of the data that you are pasting. If...

Query formulas (dates in formulas to be changed only once)
I have several queries that contain several hard-coded formulas. If possible, I would prefer that the formulas be referenced in a control or setup table. Does that make sense? Instead of going through my queries each month and updating hardcoded dates, I would like the dates to be changed only once and have all the formulas reference this source. Thank you!! Craig It makes sense to do this. How you do it depends on what the formulas are? For instance if you are just trying to get the data for a prior month, you can change the formula to get the prior month based on the system ...

Select records from query using added checkbox
Hallo, I have a subform in which I show records resulting from a query displaying certain data from two tables. I would like to add a checkbox to every entry of this query, so the user can select the query-records he wants to use to perform additional tasks with. E.g. Say the query collects data on persons and their jobs based on certain criteria. The user must be able to (de-) select the persons he would like to leave out of a report that will be made once the user has decided on the persons. Also I would like to have all the checkboxes initially checked, so the user only has to deselect s...

BSOD in RtlStringCbVPrintfA() when using %wZ format specifiers on XPSP3
I get a BSOD when using this func with the UNICODE_STRING format specifier %wZ (the bug is actually in vsnprintf. when the UNICODE_STRING is empty. ie, a valid buffer (zeroed or unzeroed makes no difference) with the Length and MaximumLength set to zero. Now I know these specifiers aren't documented, but they exist, and are well known, and used. This is the crash: 0: kd> !analyze -v ******************************************************************************* * * * Bugcheck Analysis * * * ****************...

Convert text to number
Hi guys, I receive a workbook that contains unformatted text and need to wor with numbers. I have MS Excel 2000 and can not convert text to number Just do not know how. P.S. Select Range - Format to number does not work. Thanks a lot to everybody who has any advice. Irina -- Irin ----------------------------------------------------------------------- Irina's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=868 View this thread: http://www.excelforum.com/showthread.php?threadid=26345 Hi what type of text does your range contain. Could you post an example? ...

Report Card-like format
I don't know the best NG for this questions, so I guess that's why they've got excel.misc <g>. I have a simple table of data like this: Date Field1 Field2 Field3 7/14/2003 123 254 75 7/15/2003 201 10 124 7/16/2003 215 258 2 7/17/2003 78 8 89 7/18/2003 125 186 582 7/19/2003 254 45 257 7/20/2003 200 199 89 The table is always the same size, but the data changes as the days go by. What I'd like to do is have the table look like a card. Sort of like a report card or other. My idea is a rectangle ...

want Know Excel deeply
Hi, I am prince, n i want to know some commend in excel EggHeadCafe - Software Developer Portal of Choice Generic GetXmlReader Data Access Method http://www.eggheadcafe.com/tutorials/aspnet/4b9d6e1c-abe2-4f4d-9abd-b6ebb3575e5e/generic-getxmlreader-data.aspx Here's a few websites that you can work your way through: http://www.cpearson.com/excel/topic.aspx http://www.contextures.com/tiptech.html http://www.datapigtechnologies.com/ExcelMain.htm http://www.xldynamic.com/source/xld.html http://www.mcgimpsey.com/excel/index.html http://www.mvps.org/dmcritchie/excel/excel.htm There are ...

Excel Spreadsheets Reformat Question
I have a disk full of Excel files; I suspect they were created by exporting from an accounting program to Excel to share the financial information with others. Each of these files needs to be PDFd and Bates stamped for production in a legal matter. The problem is this: every single one of these Excel files is not formatted to display all of the information - in order to get a readable page, the columns need to be reformatted to display all of the information contained in each of them, then saved. There are literally hundreds of these files; would there be an easier way of gett...

Macros in Excel
I am trying to automate two function for multiple users of a series of microsoft files. While running a macro to create a new file for archiving specific data, I would like the user to be able to assign a filename while running the macro that creates the file. Is this possible? If so, how? Second, for the above mentioned file I would like to create a macro the automatically launches the send to mail recipient function, but allows the user to select the recipients from a corporate mail list while running the macro. Any help would be greatly appreciated! Thanks! Take a look at Appl...

Cells formated as text do not always display properly
I am using Office XP and Windows XP. I have formatted a column of cells as text and word wrap is checked, horizontal alignment is Left, Vertical alignment is Bottom. I use these cells to type a short narrative. The problem is some of the cells will not display properly, all they show is ######. The row height will expand to hold the text sometimes but not always but it will still only show ######## instead of the text I typed. If I change the cell type to General all the text is visible. This does not happed to evey cell, only some of them. I can type several rows of data with a narr...

Maintaining the size of the excel tables
I have been trying to insert tables from excel into my publisher file. I tried to insert them as an object and they didnt look good. I used pase sepcial and inserted them as enhanced pictures and other time as an excel sheet. However, no matter what I do I cant get these tables to look the same as they are in the excel sheet. They dont maintain the size and neither the look. Either the table looks too loose or the letters and numbers looks bigger than the orginal. Any tips or advices please ? Maybe the solution would be to create a table in Publisher, copy the cells in Excel, p...

After 10.1.5 update, word entoruage ok. Excel and Powerpoint crash
Hello All, Previously running Office v.x 10.1.3 and decided to download and install 10.1.4 and 10.1.5. Things seemed ok but then Excel and PowerPoint will unexpectedly quit after the splash screen and seeing the menu options. Word and Entourage work just fine. I've rebooted and also run First Aid to repair permissions. Still the same. I even reinstalled 10.1.5. Please help! This is driving me crazy! In article <_vubb.122055$mp.62781@rwcrnsc51.ops.asp.att.net>, "Tech Guy" <nospam@nospam.com> wrote: > Hello All, > > Previously running Office v.x 1...

Excel Date
want to be able to have a cell auto fill the first time the sheet i saved so i have the creation date. Then if poss - never let them chang the cell so it keeps record of when the file was first created. Thanks - any help will get some free chocolate! ;-) Arie Astor Chocolate Corp. www.astorchocolate.co -- Message posted from http://www.ExcelForum.com Try some code in the workbook module ; e.g. Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) If Range("Sheet1!A1") = "" Then Range("Sheet1!A1") = Date End If End Sub Then set Sheet1...

Compare dates (one cell not in date format)
Hi all, I have one column of cells in date format (6/14/2005) and anothe column of cells which also contains a date pulled from a database bu this second column is not in date format, it comes from the databas like this 2005Jan20. I need to compare the two dates to work out th number of days between the dates but I can't convert the second date t date format. Is there any way I can work out the number of days between the tw dates? Thanks in advance Crai -- craigcs ----------------------------------------------------------------------- craigcsb's Profile: http://www.excelforum.com/...

# NEW CHALLENGE: HOW TO PRODUCE COMBINATIONS OF DIFFERENT RANDOM NUMBERS AND DO NOT FULLY single repeatable in Excel 2003?
# NEW CHALLENGE: HOW TO PRODUCE combinations of different random numbers AND DO NOT FULLY single repeatable in Excel 2003? Well I found a function that produces random numbers different each other. The only problem is that since they need to apply function repeatedly through a cycle of VBA macro (DO. ... LOOP) it (a function that returns random numbers different from each other) combinations can produce duplicate (eg 1,2,3,4,5) (, (7, 10, 11, 4), [1.2.3.4.5) ...<-- COMBINATION DUPLICATE!) And I would like to know how to do that is avoid this and produze randomly all the different possible ...

Will Windows' format mark bad sectors?
The external (USB connected) hard drive I use for backups apparently has developed some bad spots. Formatting the drive starts producing System Event Log entries at about 12% into the format, with the decription being "The driver detected a controller error on \Device\Harddisk3\D." If I allow the format to continue, will it eventually plow its way through the bad area and mark those sectors as bad, or is this whole exercise a waste of time? -- Bert Hyman St. Paul, MN bert@iphouse.com Waste of time would by my feeling! When a "modern" drive has enough er...

Excel Reference?
I get a tooltip telling me that: Name 'EXL' is not declared and EXL has a squiggle line under it. I went to Project > Add Reference > COM > Microsoft 10.0 Object Library and still get that tooltip popping up. Code below: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim WSheet As New Excel.Worksheet() WSheet = EXL.Workbooks.Open("C:\TEST.XLS").Worksheets.Item(1) EXL.Range("A2:E3").Select() Dim CData As Excel.Range CData = EXL.Selection ...

Updating SQL Queries in Excel
Hi, as a newbie I have created queries on several work sheets of a work book. Each one is saved with a different name. This is all working fine. However, when I want to update each query I have to log on individually to each one. I really wanted to log on to the database only once and then have all the queries run and update similtaniously and to avoid have to log on to each one. Can anyone help me with that? You need to create stored procedures. What database is it? HTH Bob "Laura" <lvlandmark@gmail.com> wrote in message news:03c96f3c-8b14-49ef-9ab8-0cf...

Formatting a List Box for Uppercase
I'm trying to format the data in a List Box to be upper case. I've tried ">" in the field properties, but that doesn't work. Below is the SQL Statement in my query. Any idea where I would insert something to make the First_Name and Last_Name fields to be all upper case letters? SELECT DISTINCT [tbl_PMS_Persons].[FIRST_NAME] & " " & [LAST_NAME] AS Expr1 FROM tbl_PMS_Persons ORDER BY [tbl_PMS_Persons].[FIRST_NAME] & " " & [LAST_NAME]; Thanks in advance, Fred Try changing the Row Source of the list box SELECT DISTINCT UCas...

Displaying Query Results in a Textbox
Hello I am having a problem getting the results of a query to appear in a textbox. Does anyone know how to do this? Thanks JJJJS Please give a few details. -- -Larry- -- <craigalaniz@pobox.com> wrote in message news:1178829331.981143.115990@n59g2000hsh.googlegroups.com... > Hello > > I am having a problem getting the results of a query to appear in a > textbox. > > Does anyone know how to do this? > > Thanks > > JJJJS > ...