Import File xls format

dhen21dx

Board Regular
Joined
May 10, 2013
Messages
138
Hello,

I have a problem with importing the xls format in MS Access, hope someone can help me. I downloaded report from Sharepoint but opening the file have this warning " The file format and extension of don't match. The file could be corrupterd or unsafe. Unless you trust its source, dont open it. Do you want to open it anyway." and while importing it in Access error also occur "The wizrd is unable to access information in the file '.xls'. Please check that the file exists and is in the correct format."
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Micron

Well-known Member
Joined
Jun 3, 2015
Messages
2,129
Office Version
  1. 365
Platform
  1. Windows
I downloaded report from Sharepoint
As what type of file (xls, xlsm, xlsx) and to where?
You are trying to open it how - directly? In code?
Your version of Access?
You are actually importing this into a db or linking to it?
Do you want to open it anyway.
To this you say what? Yes? No? and what happens if Yes?
Files from SharePoint can be 'tagged' the same as if you got them from a web site - especially if the SP server is web based. In that case, they will present a security warning but you are usually left with the option of opening it anyway, so that's one reason for all the questions.
 

dhen21dx

Board Regular
Joined
May 10, 2013
Messages
138
Hello, I have 2016 Access, the downloaded file is says xls format and i opening it via excel app first when i got that warning and i gonna be appending it to DB. Actually i want to import it in Access however i got error that's why i examine the excel file.
 

welshgasman

Well-known Member
Joined
May 25, 2013
Messages
885
Open the file in Notepad.
Does it have [Content_Types].xml at the top of the file?, is fo it is xlsx format (or xlsm). Try changing the extension to xlsx.

HTH
 

Micron

Well-known Member
Joined
Jun 3, 2015
Messages
2,129
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

I think what you have there is an HTML or XML file wrapped as XLS and you are trying to open it from a non-trusted location. See if the folder that the file is in is a Trusted Location and if not, move the file to one that is trusted and see what happens when you try to open it
OR
in the current folder, right click on file and see if 'blocked' is checked (on General tab) and if so, unblock it and see if you can open.
The latter method is more secure but would require you to do this for every new version of the file if you are going to repeatedly import into Access. If you link it to Access instead, I believe you will have to use the former method.
 

dhen21dx

Board Regular
Joined
May 10, 2013
Messages
138
Yes i think, its HTML or XML file wrapped as XLS, Do you have any suggestion on how it automatically maybe ms access can open it and save as it before the upload function? Thanks
 

Micron

Well-known Member
Joined
Jun 3, 2015
Messages
2,129
Office Version
  1. 365
Platform
  1. Windows
It would all come down to the results of what I suggested. Did you try the suggestions?
 

dhen21dx

Board Regular
Joined
May 10, 2013
Messages
138
Hi Micron, Sorry i was in Vacation. As the download of data is dynamic, we want to automate as well the convertion of HTML/XML to real xls if possible in Access.
Thanks
 

Watch MrExcel Video

Forum statistics

Threads
1,132,914
Messages
5,655,923
Members
418,253
Latest member
TheJackal26

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
Top