Access export to EXCEL - Color Filled exported content

Pumpk1n

Board Regular
Joined
Jan 31, 2017
Messages
86
Office Version
  1. 365
Platform
  1. Windows
I don't have any formatting in the template file. Access exports the data to a new tab called "Deferred". With the export, all the content has a yellow fill. I don't understand why/where it is setting those properties. Is it in the VBA code or how do I find where this is being controlled?


Dim str_office_loc As String, oldPath As String, newPath As String, fs As Object
Dim MyXL As Object
Set MyXL = CreateObject("Excel.Application")

Template = ".....Award File Template.xlsx"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Qry_CopyDeferred_Award_Data", Data, True, "Deferred"


Edit:
Also posted in Excel forum: https://www.mrexcel.com/forum/excel...port-formats-all-content-yellow-fill-why.html
 
Last edited by a moderator:

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
I would have to assume it is formatting in the Excel template. Possibly Conditional Formatting which is why you might not see it if you just open the template as is.
 
Upvote 0
Re: VBA Export formats all content as yellow fill - Why?

Thanks -- I had tested the conditional formatting and there was nothing in the workbook to set the conditional formatting.

I have VBA code which exports data to an EXCEL file. I don't have any formatting in the template file. With the export, all the content has a yellow fill and I don't understand why/where it is setting those properties. Is it in the VBA code or how do I find where this is being controlled?

the VBA code seems very generic and simple. -- Here's the VBA Code:

Dim str_office_loc As String, oldPath As String, newPath As String, fs As Object
Dim MyXL As Object
Set MyXL = CreateObject("Excel.Application")

Template = ".....Award File Template.xlsx"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Qry_CopyDeferred_Award_Data", Data, True, "Deferred"


Edit:
Also posted in Access forum: https://www.mrexcel.com/forum/micro...port-excel-color-filled-exported-content.html
 
Upvote 0
Re: VBA Export formats all content as yellow fill - Why?

I really can't think why Access would cause this in any way. It is remotely possible for excel to have something strange in it. I would recreate the template workbook to (probably) fix this.
 
Upvote 0
Re: VBA Export formats all content as yellow fill - Why?

I really can't think why Access would cause this in any way. It is remotely possible for excel to have something strange in it. I would recreate the template workbook to (probably) fix this.

Thanks. I did create a new blank template and the data does not appear highlighted. Not sure what was driving that in the prior template.
 
Upvote 0

Forum statistics

Threads
1,221,674
Messages
6,161,215
Members
451,691
Latest member
fjaimes042510

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top