Export to excel (1 Viewer)

Joy83

Member
Local time
Today, 10:31
Joined
Jan 9, 2020
Messages
101
Hi
I am exporting a temporary table in access to excel. It transferred all the complete data.
However, the format has some issues

I am using the exported figures to create a detailed report that contains charts and some information all in excel

when I export the data to the excel sheet,
I get this green mark on each cell (attach example)
My code doesn’t work unless I double click on each cell.
I assume the format need to be fixed during the transfer or something.


This is the code I am using to export:
Domd. TransferSpreadsheet acExport, acSpreadsheetTypeExcel12,"TempTable","C: \Chart.xlsx”,true

is there anyway to export that data with general or number format without having this green flag
 

Attachments

  • 4E40C3AE-D9E3-4211-8F94-6C4C5EB8D07B.jpeg
    4E40C3AE-D9E3-4211-8F94-6C4C5EB8D07B.jpeg
    159.8 KB · Views: 102

Ranman256

Well-known member
Local time
Today, 13:31
Joined
Apr 9, 2015
Messages
4,103
in query design,
you can right click on the field (in the grid) and set the format for that cell.
It should now export with the correct format.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 01:31
Joined
May 7, 2009
Messages
16,504
you bring your Temp table in design view and change those last 4 fields to Numeric.
 

Joy83

Member
Local time
Today, 10:31
Joined
Jan 9, 2020
Messages
101
you bring your Temp table in design view and change those last 4 fields to Numeric.
Thanks for your reply
I am exporting a table and I am specifying the type of field there already
 

Gasman

Enthusiastic Amateur
Local time
Today, 18:31
Joined
Sep 21, 2011
Messages
10,618
Use an export spec?
 

Joy83

Member
Local time
Today, 10:31
Joined
Jan 9, 2020
Messages
101
Ok it is working now
It looks that my excel file was corrupted
I created a new one and it worked

Is there any way to delete a chart in a specific sheet
Without deleting the sheet itself
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 01:31
Joined
May 7, 2009
Messages
16,504
Dim i As Integer
Dim shp As Shape
For i = ActiveSheet.Shapes.Count To 1 Step -1
ActiveSheet.Shapes.Item(i).Delete
Next
 

Users who are viewing this thread

Top Bottom