MacOS: Unable to 'Get Data' from folder in Excel Power Query - excel

I am trying to introduce Power Query into some processes. Currently, I am working on a MacBook, which apparently poses some difficulties with Power Query.
I am able to import Excel- and CSV-files with no issues. However, for the task at hand, I need to get data from multiple files in a folder.
Hence my question: Can it really be true that this is not possible to do on Excel for Mac?
Can the data be imported e.g., in Google Sheets and then exported to an .xlsx file?

Related

Identify Excel Workbooks which connect to a given Excel file

My team has a large number of workbooks which connect via Power Query to a few static Excel files which are updated periodically with new data. I am trying to change these sources to a database to eliminate the need for these flat files, but my challenge is in ensuring all workbooks which connect to the static files are updated.
I am wondering if there is a way to do some sort of reverse lookup of query connections to a particular workbook so I can see which workbooks reference a given data file. I have googled a variety of questions but haven't had any luck finding an answer yet. Any help is appreciated!

Importing data from .xls files when gettimg data from a folder in power query

I have tried to get data from a particular folder containing only .xls using power query without any luck. Right now I'm running a macro to save as .xlsx before refreshing the data, however, I'd like to reduce that step and get data without having to change the format.
Can anyone help me with the same?

Docx4J Generated XLSX file is always corrupt

TL;DR: Excel Workbook generated by Docx4J always says corrupted but I can't determine what Excel doesn't like about the underlying XML, let alone how to fix it.
My use case is as follows:
I am trying to produce an excel workbook with charts and graphs automatically on a regular basis. Only the raw data will change but everything else will dynamically update as the raw data is changed.
So I built an excel workbook which has a number of charts and graphs being generated by a sheet of raw data. I am using it as a template. All values of the raw data are numeric. The intent was to use Docx4J to read this 'template' and to populate the raw data sheet, then save it as a new file whereupon opening will initiate the recalculation and the charts and graphs will update. Since I am new to Docx4j, I basically decided to do baby steps by first seeing if I could open and read the contents of the cells; which I could. So far so good. I also could change the values of the cells but I could only verify this programatically by writing out to the console the location and value before a change, then the location and value after the change (ex. A1=45 followed by A1=55).
My problem starts when I try to open the resulting file. It generates, looks to be about the right size but Excel claims it is corrupted. It does try to recover what it can, but ultimately fails and the workbook won't even open. For troubleshooting, I opened up the generated xlsx and confirmed all the various XML files that make up an xlsx file were present and readable so I am concluding either something is missing or some part of the XML coming out the other side is not what Excel wants. Further troubleshooting involved creating an empty workbook (no data, 1 sheet) as my 'template', opening it and then saving it back to the file system with a different name and simply trying to see if I could open it in Excel but no dice. This has me ruling out anything to do with my attempts to write or add data to the sheet.
Relevant Environment Information:
'template' workbook is being generated on a Windows 10 64bit machine
My docx4j code is executing on a Debian 10 Linux machine running OpenJDK 11.0.4
My version of Excel both to create the 'template' and open the copy is Excel for Office365
I am running Docx4J v11.1.3 but I also tried with v8.1.5(both cases I had to use the Reference Implementation of JAXB to get around a marshalling error when trying to save)
I did see another post on Stackoverflow here about an issue related to fonts in Linux environments so I made sure to install the MS TT Corefonts but it didn't help my problem.
I ran the entire unzipped directory through BeyondCompare and there are some differences but I don't know which are just artifacts of the two different OS' or even which differences matter. Mostly they are:
small differences in file size
boolean values showing as "1", "yes", or "true" but not the same way for both files
namespaces and attributes in one file but not the other
Sheet1 from my blank workbook, before and after
All ideas are welcome.
Please try the just-released docx4j 8.1.6, which fixes handling of xlsx files created by recent releases of Excel. This was https://github.com/plutext/docx4j/issues/389

Excel - updating a worksheet from a SSRS scheduled report datasource

I have tried the various different methods that Excel offers to work with external data.
I have inherited a system in work that involves copy and pasting data from one SSRS report into a pretty complex Excel workbook. I want to automate this system, but for the time being I still have to work with the Excel file.
This Excel file needs to be updated daily - I want to schedule the SSRS report using Windows File Sharing; have it run every day and have the Excel workbook look at the report each time the spreadsheet is opened, updating (adding data to) various tables and cells with the values in the report.
I'm finding this process really unstable. It will work for some reports, but not others. Any pivot charts based on the connection will lose their data and formatting if the sheets cannot link to each other. On opening the main, destination excel file, I get errors about links not being updated, etc. Browsing for the file and reconnecting it works, but this defeats the object.
Could the be something integral to these set up working every time that I might be missing, or does Excel have a feature that better suits what I'm trying to do?
Many thanks for your help!
I'm using SQL Server 2005, Excel 2013 and the reports and datasheet are stored in a shared folder
I think you are heading down a dead-end. You will never have enough control over the rendered output from SSRS and any solution will be fragile.
I assume the SSRS data source is SQL or some other source that Excel can read. I would take the Dataset code from the SSRS report and implement it as Data tables in Excel, e.g. Data ribbon / Get External Data.
In the simplest implementation, each query just populates an Excel Table. You can set the connection definitions to auto-refresh on open.
For more complex requirements you can build an Analysis Model in Excel using the Power Pivot Add-In (included (but not enabled) with Excel 2013). This lets you relate datasets to each other and add calculations etc. The gotcha here is that you cant auto-refresh without SharePoint.

VBA to write data into Excel used by multiple users on a network?

Basically I have a master workbook on a network drive which is used by many to update the sheet, I want to automate this, through my research I found there are many complications with it if I automate it.
Searching on Google gave me the following suggestions and I have noted some complications with these solutions
using VBA open and write data and close it.
there are chances that Excel is already opened by others and it is in read only mode, so I can't write. Even though I tried open and write but it's taking too long getting stuck.
Share the workbook and write data
for this to happen the workbook should be opened and shared by one at least, while writing data if two people are writing data at a time there is a chance that one could overwrite data of others
using ADO write data into Excel
I don't have any idea about ADO and how it can be used to write data into Excel, saw some examples and ended up nothing to comprehend.
Set up an Access database
Connect to the database from an Excel: Go to the ribbon: Data > From Access. This almost works like a pivot table and is indeed view only.
You can also store all the data still in an Excel and again use the External Data options (From Other Sources > Wizard > Other/Advanced > (tab) Connection > Use data source name > Excel Files > OK) to connect to it from a central Excel that all users use.
For writing to your database I would recommend using VBA nonetheless, if thats beyond you then you might want to get busy with it soon as that would probably be the best way for you to enable your users to write.

Resources