Una famiglia di sistemi di gestione per database relazionali di Microsoft progettati per semplificare l'uso.
ciao Nicolo,
credo tu sia incappato in questo :
https://support.microsoft.com/it-it/kb/924681
problema riproducibile anche con Access 2010 pro.
prova con questa mini automazione, personalizzando il nome della tabella, e il path di destino.
Copia tutto in un modulo standard e lancia la sub export, che una volta perfezionata esporta la tabella in Excel la salva e ti mostra il file esportato.
Testato su 1,000,000 di righe, tutto ok e Access 2010 pro, non Home, che non possiedo, ma credo funzioni ugualmente...
Facci sapere.
Ciao, Sandro.
Option Compare Database
Option Explicit
Private XlsClass As Object
Public Sub export()
On Error GoTo errorHandler
If Not isXLSRunnning() Then Exit Sub
Dim wbk As Object
Dim wsh As Object
Const strWkPath = "f:" ' <<< personalizzare
Const strWkName = "tabella1.xlsx" ' <<< personalizzare
Const strTbl = "tabella1"
Const cStrClass = "Excel.Application"
DoCmd.TransferSpreadsheet transferType:=acExport, _
spreadSheettype:=acSpreadsheetTypeExcel12Xml, _
tableName:=strTbl, _
FileName:=strWkPath & strWkName, _
hasFieldNames:=-1
Set wbk = XlsClass.Workbooks.Open(strWkPath & strWkName)
Set wsh = wbk.worksheets.Item(1)
With XlsClass
.Visible = True
AppActivate .Caption
.ScreenUpdating = False
.Calculation = -4135 ' xlManual
With wsh
.Cells.EntireColumn.AutoFit
End With
.ScreenUpdating = True
.Calculation = -4105 'xlAutomatic
.displayAlerts = True
wbk.Save
End With
exitErrorHandler:
Set wsh = Nothing
Set wbk = Nothing
Set XlsClass = Nothing
Exit Sub
errorHandler:
With Err
MsgBox "ERR#" & CStr(.Number) _
& vbNewLine & .Description _
, vbOKOnly Or vbCritical
End With
Resume exitErrorHandler
End Sub
Private Function isXLSRunnning() As Boolean
On Error Resume Next
Set XlsClass = GetObject(, "Excel.Application")
Err.Clear
If XlsClass Is Nothing Then
Set XlsClass = CreateObject("Excel.Application")
XlsClass.Visible = False
End If
If Err <> 0 Then
MsgBox "qualcosa non va...." & _
Err.Description, vbCritical, "Warning"
isXLSRunnning = False
Else
isXLSRunnning = True
End If
End Function