Can't refresh external connection in Excel from Mac - excel

I have an Excel workbook that has several External data connections via PowerQuery (actually from built-in Data > Get External Data, and slightly modified code in PowerQuery to include variable filenames). The connections are made to .xslx, .xlsm and .csv files.
As I read, Microsoft states that it is possible to refresh existing connections on Mac, that are made to these types of files (not sure about .xlsm, but probably that does not matter, as not a single connection refreshes). However, when I try to refresh a query, it throws an error:
[Expression.Error] The module named 'ExcelInterop' has been disabled in this context.
At first, I thought it was a connection to Named Table in the current workbook (as I read on Microsoft, it is not supported in Mac), but even when I removed it, the problem persisted. There is not really much information on Google on this issue, so I post it here. Is there a way to actually refresh the data on Mac or no? Thanks to all.

Related

How to modify data in an External data base connection using excel as a front-end

I have an excel front end which connects to a number of data sources. I would like changes made to the data using the front end, to update the source. How do i do this? The connections are to locally stored workbooks. They will eventually move to network stored workbooks which others can modify directly.
Your best bet is probably a connection string. Then use some SQL queries. Although I have not tried it myself. My co-worker does it all the time - update a front-end workbook then then update another workbook automatically by VBA.
Source: https://www.connectionstrings.com/excel/

Automation - Replace Connection Properties on Excel

I'm currently working on maintaining some old (new format .xlsx) excels with more than 60+ connections each that feed some various tables from a SqlServer.
I'm in search of some kind of toolkit, module, standalone script (or anything really) that let me bulk change the command text inside each connection properties.
The change should be not harder than changing part of the table name as the new table only contains the information that the table needs.
So far, the only thing that gets near what I need are those python modules but they don't appear to implement anything for handling connections.
Thank you in advance for any help you can provide.

How can ADO.NET read a locked Excel file?

ADO.NET works fine when it comes to reading tabular data from excel files, but one problem I often run into is that if the excel file is locked by some other user there is an exception when ADO.NET attempts to retrieve the data.
Is it possible to tell ADO.NET to read contents from the excel file even if it's locked? If so, how can it be done? Do I need to add something to the connection string? The extended properties of my connection string are:
Excel 12.0;HDR=YES;IMEX=1
I had similar problem and I could not find a solution. I ended it up with timer re-trying to connect to a file.
The problem lies in the database itself. In the end of the day it is only a flat file and ADO requires exclusive access to it. You probably need to migrate your solution to MS Access mdb file or a proper(ish) database (SQLite?)

Cannot connect csv to Excel thru ODBC

HI;
I cannot connect a CSV file to a SpreadSheet when the file is open. Currently a have a csv log file that is being constantly updated. I was able to connect it a an Excel SpreadSheet by normal import from external source with refresh every hour. However, its a big file so I needed to produce the reports using EXCEL SQL. It will not allow me to connect to the file while it is open. It says that the MS Jet database engine cannot open the file'unknown'. It is already opened exclusively by another user or i need permission to view its data. If granting permission is he problem , where do I grant myself permission. On a standard Impor, I have no problems reading the file while it is open, but otherwise, get this message and cannot proce3ed. Any help would be appreciated. If I close the update program, I am able to run the queries, but not if the update is running.
Using MSO 2007 W7 x64
It will not allow me to connect to the file while it is open.
That's right, it won't - there is no way to change this.
You must find another way to solve your problem.
How big is the file? You may be able to make a copy to a temporary filename, and connect Excel to that instead.
It sounds like you are accessing a logfile. LogParser can read CSV. In any case LogParser has an excellent SQL-like syntax and can read CSV files much more quickly and reliably than ODBC. It is also programmable from Excel VBA (or script). Perhaps you can use LogParser to extract the values of interest and then load those into your Excel table instead.
I suspect your best solution will be to use the LogParser MSUtil.LogQuery object from Excel VBA, to extract the values of interest into your spreadsheet. Since I don't know what you are actually doing this is just a guess!
I cannot recommend LogParser highly enough - it is a wonderful tool, and can read just about every standard type of logfile, CSV, TSV, W3C, as well as plain text files and the windows NT event logs:
LogParser 2.2 Download: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&displaylang=en

Cannot pull SAP data using Excel (Permissions issue?)

I recently (today, actually) got some new permissions to some SAP tables, but I'm getting permissions issues with importing them. Here's how my process looks right now:
I have an Access db that links to SAP tables via an ODBC connection.
In that same Access db, a set of spaghetti-like queries pulls & refines a modest data set (a dozen columns, few hundred rows, nothing special). I can run these queries without a problem.
An Excel file imports that data using Data->Import External Data->Import Data. I do this all the time. Except this time, I'm getting the dialog pictured below. Clicking OK doesn't seem to do anything. Clicking Cancel produces an "ODBC Connection Failure" message (or something like that).
Again, these queries can be run from Access just fine. But when I import those query results into Excel, I get this problem. I can get around it with a make-table query, but since someone else is maintaining the Access db, I'd rather not make any changes to it.
I was going thru my old unanswered questions and found this one. I think I solved this by using a staging table in Access to store the data and then later importing into Excel from that staging table.

Resources