UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Error 3274 When Trying To Import Excel To Access, Access 2010    
 
   
nenakat
post Aug 9 2018, 11:49 AM
Post#1



Posts: 11
Joined: 16-August 17



Hi:

I have VBA to import multiple Excel files into the Access database, and then save the file to a different location. This is based on a post I had read here from 'Tina T' notworthy.gif - and it has been working fine for the past two months. Now, some days when clicking on the button to import the file, the infamous 'Error 3274 - External table is not in the expected format' is rearing its head. pullhair.gif

I have researched both here in UtterAccess, and Googled it. I have relinked to the file, have saved the Excel file from .xlsx to .xlx, redone the Business Objects file that produces the Excel file - and still this error will show up sometimes, and other days it is smooth sailing.

Does anyone know what else I can try to resolve this?

Here is the VBA that I use. It is called from a Macro that first downloads text file(s), then this Excel file(s), then sends out a comparison report via email


Public Function ImportFacetsDE()
On Error GoTo ImportFacetsDE_Error

Dim strOrigFileName As String
Dim strNetWorkFolder As String
Dim strFinishedFolder As String

'Identify folder where report from Facets is located
strNetWorkFolder = "\\somepath...\PHP-Daily Direct Entry Reports\"
strFinishedFolder = "\\somepath...\PHP-Daily Direct Entry Reports\Verified Reports\"

strOrigFileName = Dir(strNetWorkFolder & "*.xls*")

Do Until strOrigFileName = ""
Name strNetWorkFolder & strOrigFileName As strNetWorkFolder & "MyXcelImport.xlsx"
CurrentDb.Execute "qryAppDE"
Name strNetWorkFolder & "myXcelImport.xls*" As strFinishedFolder & strOrigFileName
strOrigFileName = Dir
Loop

ImportFacetsDE_Error:
If Err.Number = 0 Then
Resume Next
ElseIf Err.Number = 20 Then
Resume Next
Else
MsgBox "An error occurred when trying to import Business Objects report. " & _
"Please report the error to Claims Business Analyst as follows." & vbCrLf & _
"Error #: " & Err.Number & vbCrLf & _
"Description: " & Err.DESCRIPTION, _
vbOKOnly Or vbInformation, "OnBase vs Facets"
CANCEL = True
End If
Resume Error_Handler_Exit

Thank you in advance for any help you could provide
Katy
Go to the top of the page
 
theDBguy
post Aug 9 2018, 11:57 AM
Post#2


Access Wiki and Forums Moderator
Posts: 73,704
Joined: 19-June 07
From: SunnySandyEggo


Hi Katy,

Welcome to UtterAccess!
welcome2UA.gif

I have been seeing a few of these reports lately, so it makes me think it's a bug. However, I would have expected it to apply only to 2016, but you're using 2010.

Did you say it only happens sometimes, not all the time? If so, does it always fail on the same specific file(s)?

If it is a bug, I am not sure what we can do to fix it.
Go to the top of the page
 
nenakat
post Aug 9 2018, 05:05 PM
Post#3



Posts: 11
Joined: 16-August 17



Hi DbGuy:

yes, it happens on the same file. I have a Business Objects report that is saved automatically in .xlsx format to the folder, then in the morning, I click on the button to import.
Yesterday the import worked fine, no problem. Today, the error 3274 appeared when trying to import the Excel file. crazy.gif

Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    13th November 2018 - 11:01 AM