Any way te read an excel file from a Google Sheet? - excel

in my organization we work with Google Apps but we have one file that we need to maintain in Excel due to its complexity. All my other spreadsheets are Google Sheets and a lot of them need to get data from that excel file. So my question is: is there a way either trough google scripts or excel publishing to get data from an excel file in Google Drive to a Google Sheet?
I know all about the other direction, Google to Excel, but Excel to Google is proven more complicated. Any help would be much appreciated.

im giving you an algorithmic-level answer without code because you also have none.
with apps script you can import the xls to drive as a new spreadsheet at regular intervals. then, copy its contents to a fixed spreadsheet (replacing previous content).
other spreadsheets can read from that fixed sprradaheet with scripts/importrange etc.

Related

use Google Apps Script to save/export Google Sheet as XLS Excel but preserve images

I've got a Google Sheet that has product info, including links to images for each item that's saved to our Google Drive.
Here's a sample Sheet.
The images are also shown on the Google Sheet. This allows people to see the items when they're using the Sheet, and also they can print to PDF or whatever.
If it matters, the way we're showing the images is by using GS's "Image" function with a link to the file.
However, some people have use cases where they want to export/save this info to an Excel file, but they still want the images shown.
Is there any way to do this with Google Apps Script or any other method? I've already done some research and couldn't find a lot of info on this.
I understand what is going on now. I tested your file in an online excel viewer. The issue you are having is that your images are not pasted into the Google sheet. They are being fetched from Google Drive using the URL of the image in Drive and the formula:IMAGE(URL). Excel does not have that IMAGE formula. So it gives you #NAME? error,because it can't understand the formula.
I reccommend you go through this answer for how to replicate the IMAGE() function from Google Sheets in Excel.

Import Data into an Excel Spreadsheet from Google Sheet

I have a Google Form which is populating a Google Sheet. Then this Google Sheet I need to be able to connect to an Excel Spreadsheet. I have been able to use the 'publish on web' method with the .csv file format. This works great for me. I am running a Office 365 so I have the most recent tools available to me.
The problem I am running into is that the Mac version of Excel does not offer this same connection capability. Roughly half of my users have a Mac and so the file is not working for them as a result. So as a result I have not been able to find a way to get the data from the Google Sheet into Excel.
This is key because this file is used by many individuals and the data to be imported is critical to enabling the solution. The following line of code is the line that is causing the problem. It basically is lock up Excel.
Sheets("Security").Range("tbl_Licensing").ListObject.QueryTable.Refresh BackgroundQuery:=False
Any ideas as to how I can make this work for a Mac and PC in the same manner?

How to prevent users from using Excel spreadsheet in Google Sheets

I would like to prevent normal users (not determined hackers) from copying an Excel spreadsheet to Google Sheets and then then using the Google version. I know I can't prevent users from copying the file, but I wonder if there are things I can do to make some features of the copied spreadsheet unusable with Google Sheets. I need a solution for this because my subscription mechanism depends on preventing the user from editing certain cells, and if the user copies the file to Google Sheets, he will be able to edit those cells (since Google Sheets does not respect Excel's cell protection).
I know that Google Sheets does not import Excel macros. So one approach might be to create macros (which I don't really need) and then tie some features to those macros, thus preventing the Google version from working. Or maybe I could use some obscure Excel function that Google doesn't support. Can anyone comment on these approaches or suggest other possibilities?

Merge data from 600+ Excel worksheets and 1 Google doc

I have around 30 Excel spreadsheets, each with 20+ worksheets. Each of these worksheets follows the same basic format, though there are slight differences. I also have a Google doc with sections that match each of the worksheets.
Somehow I need to merge the data from the spreadsheets and the Google doc into a single, searchable, editable document, which will become the new safe source, eliminating the need to maintain 600+ worksheets.
So far, the plan is to have an intern copy/paste from Excel into the appropriate section in the Google doc, but besides being akin to torture, I'm afraid this approach will take days.
Can anyone think of a way to automate at least some of this?
I've been thinking that if I could somehow take all of the Excel data and migrate it into either Microsoft Word or a Google Doc, that would be a good first step.
I have used Google Apps Script in the past and could probably figure out how to write a macro in Excel, but I can't wrap my head around how I would actually accomplish what I need to do.
I'd appreciate any suggestions.
Wanted to provide an update in case anyone else ever has a similar problem...
I ended up moving all of the existing spreadsheets to Google Drive and using Google Apps Script to iterate through the folder to get the name and id of each file and then iterate through all worksheets of each of those spreadsheets, copy all data from each sheet and append it to a new master spreadsheet.
I then migrated the existing Google Doc to a Google Sheet so I could sort.
After that I manually copied the applicable sections from this Google Sheet into the correct, corresponding section of the master spreadsheet. I'm sure someone smarter than me would have been able to script that last part as well, but I was having trouble figuring out the logic and decided to brute force the last step.

Import data from published Google spreadsheet to Excel

I am trying to import data into an Excel spreadsheet from a published Google sheet. I have published the Google sheet and copied the URL.
When I try and use that URL in my Excel spreadsheet, either with VB code or by standard Data Get External data From Web it asks me to log-in to Google. How can I get the data without having to log-in.
You can select in Google Sheets to publish as a CSV file
Then in excel use Data -> import FROM TEXT (not from web)
Paste in the link to the google sheets csv file
This should read and recognise the file, you will need to configure headers, and the Comma as the separator, format etc
Then finally one it has been imported if you go to Data -> connections you can change refresh times etc
If you are willing to use an add-in, you can have Excel and Google Sheets stay in synch.
Data Everywhere makes add-ins for Google Sheets and Excel that allows you to sync data between Google Sheets and Excel. You just highlight the data you want to synchronize, and both your Excel spreadsheets and your Google Sheets spreadsheets will always be in sync.
You can get it at Data Everywhere, or from the Google Sheets Add-in store at https://chrome.google.com/webstore/detail/data-everywhere/foenaaepondggfpfonagpmdaggmpdeel?hl=en-US
Unfortunately, this add-on no longer works.

Resources