Is MS Office necessary when using Microsoft.Jet.OLEDB provider? - excel

I am trying to read an excel file an can do it using ADO.
My question is, do I need to have office installed when reading an excel file using the Jet.OLEDB Provider?
Currently I'm only testing on pcs that have office installed, that's why I'm asking.Programming language in concern is VB6.
Thanks.

No, you won't need to have office installed, but you will need to have MDAC/WDAC (which contains Jet) installed. On newer operating systems, this is part of the OS. On older OS's (Win 95/98/possibly even 2000), you needed to run an MDAC installer.

No - The Jet driver is used for reading any form of DB files from text files to Excel to Access and is offered my Microsoft independantly of Office.

Related

How to Run Excel on a Mac? (windows edition)

I need to run the Microsoft Windows edition of Excel, but I'm using a Mac. I currently have Excel for my Mac, but it doesn't have all the functionality of Windows version. I need the advanced functionality only available in Windows edition. (Using Google Sheets isn't an option in this scenario). I have a license for Excel (both Windows and Mac editions).
I've heard Parallels (https://www.parallels.com/) is one way of doing it, but that would require me to have to purchase additional software.
I've thought about buying another computer, but I don't want to have to carry around 2 computers (one windows and one Mac).
Is there a way I could use Microsoft Azure, or some other cloud service to rent a windows PC, install Excel and access it from my mac?
I found this on pricing for a virtual machine, but it's not clear If it would allow to to accomplish this.
https://azure.microsoft.com/en-us/pricing/purchase-options/pay-as-you-go/
https://learn.microsoft.com/en-us/azure/virtual-desktop/
Any suggestions, or experience running the Windows edition of Excel from a Mac?
This might be a bit of a stretch, but have you looked into using Bootcamp? All you have to do is partition a part of your hard drive, then you can boot into Windows and run it natively. Bootcamp is great, as long as you understand the concept and how to use it.

ODBC Excel Driver: Unexpected error from external database driver

Since the Windows update from October 10, the ODBC Excel drivers have stopped working. We get the following error when trying to read a file:
"Unexpected error from external database driver (1)"
We open Excel files in Delphi using an ADO connection with the following connection string:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;Extended Properties="Excel 8.0;HDR=Yes;IMEX=1";
I can get it to work by switching to Microsoft.ACE.OLEDB.12.0, but for that to work, all our customers would have to install the Microsoft Access Database Engine Redistributable on all the computers they use our software on.
Does anybody have another solution or workaround? Thanks in advance.
On a customers machine I have deinstalled KB4041681 (Windows 7) which came with last Microsoft Patch.
On my machine I have deinstalled KB4041676 (Windows 10).
After that Microsoft.Jet.OLEDB.4.0 is now working.
I hope that Microsoft will fix this bug soon.
There is one solution. Replace "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;Extended Properties="Excel 8.0;HDR=Yes;IMEX=1"
with Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\MyExcel.xls; Extended Properties=\"Excel 12.0;HDR = YES;
After this change you will have to install 2007 Office System Driver: Data Connectivity Components from link on customer machine.
I had the same problem with 2 applications developed by me since 3 years (c# and java).
Since 10-oct-2017 I couldn't export to excel 2003 but 2007 worked, and couldn't import from excel 2003 but 2007 worked too for import.
In ArcGIS Desktop 10.5.1 By ESRI (a most popular software for Geographic processing) Couldn't open excels 2003 and .mdb files.
Temporally Solution: uninstall KB4041693, KB4041687 in windows 8.1 (maybe for w10).
In microsoft changelog of both path say something about "updates [...] and security updates for microsoft jet".
After uninstall and restart all softwares becomes to be normal again.
this problem was introduced in 10-oct-2017.
In microsoft forums this problemas was reported (kb4041693 should "fix" it but still doesn't work).
Maybe in few weeks they will path (properly) this issue.
For me, it worked following these steps:
ps.: We have a Windows Server 2008R2
1 – Download and install this: https://www.microsoft.com/en-us/download/details.aspx?id=23734
2 – Open the .dtsx file and change your Excel connection. On the properties dialog, Click on the three dots in the ConnectionString property and change it to Microsoft Excel 2007. This will automatically change your connection string to:
Provider=Microsoft.ACE.OLEDB.12.0;Data Source={YOURPATH};Extended Properties=”Excel 12.0 XML;HDR=YES”;
3 – Some of our .dtsx files point to a config file (usually has a .dtsConfig extension). I also changed these guys to point to the right provider (pretty much copied and pasted the connection string I got from visual studio)
After this, I ran the SQL Job again and it worked fine.
If you are working with SSIS package then please change your Excel Sheet version 2003 to 2007 in Excel Source or Excel destination.Generally this issue due to excel version.
I had the same problem. Changed Excel 2007 in Excel destinations. It worked. This is same as changing the provider=Microsoft.ACE.OLEDB.12.0.
HERE is the solution... i found it in another forum and work perfectly for me...
it will works 100%
As mentioned in the following:
https://forums.embarcadero.com/thread.jspa?messageID=902557&tstart=0
https://forum.kanors-emr.org/showthread.php?tid=571&pid=2652#pid2652
The KB4041681 installs version 4.0.9801.1 of msexcl40.dll.
Find prior version (4.0.9801.0) of msexcl40.dll
Place in another directory. They suggest the application directory, but since in the next step you will modify registry to point to this older version, it can probably go anywhere.
Update registry key HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Jet\4.0\Engines\Excel\win32 to point to the location from step 2.
Uninstall these updates(according to your OS) and your code will start running normally
KB4041681 - Windows 7 SP1 and Windows Server 2008 R2 SP1
KB4041690 -Windows Server 2012
KB4041693 - Windows 8.1 and Windows Server 2012 R2
KB4041678 - For me this was the issue
https://support.microsoft.com/en-in/help/4041678/windows-7-update-kb4041678
This problem was introduced by a recent update of Microsoft Office. there are not alternative solutions at the moment.

How to make Win32::OLE work on 64bit MS OFFICE installation

I have two PCs, one has MS Office 2013 32bit installed and another MS Office 64bit installed.
I have Perl code that is using Win32::OLE Perl module to manipulate XLS spreadsheets.
The code is working perfectly fine on 32bit PC, but has a problem on 64bit one.
After doing some research here is what I found out.
The problem is the following line of code:
use Win32::OLE::Const 'Microsoft Excel .* Object Library';
I looked inside Win32::OLE::Const module and it seems that the module is looking for that library in the registry. When I printed out all entries from the registry from both 32 and 64 bit I found out that this library is available on 32bit and not available on 64bit.
Is there a way to install that library on 64 bit? If not, are there any other modules that would allow OLE automation of Excel?
All my Perl script needs to do is to open XLS file and save it as CSV. I am doing it with Spreadsheet::ParseExcel and Spreadsheet::XLSX in all other scripts. The problem with this particular XLS file is that it is password protected and using non-standard password encryption. So Spreadsheet::ParseExcel is not able to open it. Win32::OLE has no issues opening the file on 32bit.
Code can be provided if needed.
Please advise.
Thank you,
-Andrey
I use your Win32::OLE::Const module to have the Excel constants available in Perl.
Recently, I had a clean Win7 x64 install with Office 2016 and the script was not working anymore (using the latest version Win32::OLE::Const module which is installed with the current (on 06/04/2016) ActiverPerl 64 bit installation).
After some investigation, I have found out that the Win32::OLE::Const did not see the Excel automation object although it was well registered and available in the registration database.
In the registration database the following key contains the path to the Excel executable:
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{00020813-0000-0000-C000-000000000046}\1.9\0\Win64
If I add manually a new key
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{00020813-0000-0000-C000-000000000046}\1.9\0\Win32
with the same path as for the Win64 key then the Perl script found the Excel typelib and worked again.
Hope this helps.
Registry key also helps with Outlook 2013.
/HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{00062FFF-0000-0000-C000-000000000046}\9.5\0\win32

Alternatives to excel addin "morefunc" at 64bit

I've a lot of documents in excel that using the morefunc's formulas (done with my excel 32bit).
Today i've discovered that there are no other version of this addin. Has the developer abandoned the development?
Unfortunatly this addin works only with 32bit version of excel
What can we do to use our documents in a machine that has installed 64bit version of Office?
There is an alternative for this addin? Something that defined the same functions with the same parameters..
Can't you just install a 32-bit version of Excel? Maybe in a virtual machine or VDI (Virtual desktop infrastructure), if you have troubles installing it on your machine?
While this will require adding macros to your documents, you might want to use VBA to emulate Morefunc's functions. All of them have VBA alternatives.

Server-based Microsoft Office to PDF Converters?

I'm looking to convert our library of MS Office files into PDFs on a Linux server. What I'm looking for is similar to this.
Anyone know of one not so costly?
unoconv is free, it uses OpenOffice to do the conversion. Unfortunately OpenOffice doesn't import MS Office files perfectly so YMMV. Another option is to use OfficeToPDF, this is however an Windows application that requires Office to be installed. You could probably solve this by running Windows in a virtual machine on your server and remotely control it.
You may consider Aspose.Words for Java, Aspose.Cells for Java, Aspose.Slides for Java; these components can convert Microsoft Word, Excel and Powerpoint files to PDF on Linux.
Disclosure: I work as developer evangelist at Aspose.

Resources