Google Sheet connect with database - mysql

I have a very big file in google sheet with many records, rows and columns.
I want to make a database from this. Can I, in some way, personalize the display? I want to reference row to field and search by name.
Is there some software of access to achieve this?
Picture of sheet
Picture of database

I'm not sure I fully understand your question but from what i gather you wish to take your google sheet and import it into a mysql database?
If so, I'd take a look at "Navicat" its a program that will let you import an xls or csv into a mysql DB (you can export the google sheet to xls)
They have a trial version here: https://www.navicat.com/de/download/navicat-premium

Related

How can I automatically import & replace data in a Google Sheet from a CSV that has been uploaded to our Google Drive?

We have some marketing software that pulls reports on email marketing and uploads a CSV automatically every week or month into our Google Drive. Our reporting software can't automatically pull data from a CSV, so I have to use Google Sheets.
How can I make it so that when a new CSV is uploaded onto the Drive (replacing the old CSV in the process), my Google Sheet will pull the new data and replace it over the old data?
The question isn't clear, meaning there are many "variables" to your question, and thus a variety of solutions which you can implement to solve the specific permutation you're looking for. But I'll try to answer your question with some considerations and suggestions:
"[A] new CSV is uploaded onto the Drive (replacing the old CSV in the process)." Are you sure this is happening? Every time you upload, say a hello.csv to Drive, it adds a new hello.csv file one rather than replacing an existing one with the same name. You would have to have an application that knows or can look up the original CSV Drive file ID and explicitly replace the file contents or upload a new version of that file.
If you do replace the original file via one of those two techniques, track the changes to that file via the Drive API, meaning your app can take action as soon as that file has been updated. See this page in the docs to learn how to detect changes.
The comment in the OP makes a suggestion from another SO Q&A, however that solution does not address the OP's question. Instead, it imports a CSV file to Google Drive as a Google Sheets (file) -- the CSV file never makes it to Drive as per the OP. Also, the OP is requesting something more than a mere import.
However, with that said, the OP's final request was: "[My] Google Sheet will pull the new data and replace it over the old data." There are 2 ways to do this:
a) The simplest/easiest way is to just overwrite all existing data in the Sheet with what's in the CSV file... old data, new data, it doesn't matter. Once the new CSV file has been imported and new Sheets file created, you can delete both the old CSV and corresponding Sheet. The (new) files can have the same names as their predecessors no problem. For that, build a solution similar to the SO Q&A mentioned above -- the CSV file will already be in Drive, so just create a new Sheets file and use the content from the CSV file on Drive (rather than from the local filesystem).
b) If you only want the deltas, you need to keep a copy of the old CSV and "diff" it with the new CSV, and only overwrite the rows that have changed, a much more complex solution, and one in which you'll have to use the Google Sheets API (because it's for spreadsheet operations while the Drive API is used for file operations).

Hiding columns by client Google Sheets

Just wondering if there are any ways to hide columns (client-side) for different users accessing the sheet?
I know you can create filter views that allows users to view and edit without having to change the actual orientation of the sheet, but I can't seem to find any way to hide columns while creating a filter view.
Any help is appreciated. Thanks.
One solution perhaps to your problem is to structure your data across several spreadsheet documents and give access to different people to each sheet.
Let's say you have a have a master spreadsheet containing all the data as a single source of truth. Then you can use an import formula in a different spreadsheet document to display certain data from the master spreadsheet.
The slave documents can be projected as need and will update automatically when the master spreadsheet is changed. Below are some formulas that can do this
Generic import data formula
=IMPORTRANGE("spreadsheet_url,Sheet1A:A")
Import formula to import only display certain - need to project the whole sheet from being copied etc.
=QUERY(IMPORTRANGE("spreadsheet_url","Sheet1!A1:C"),"SELECT Col1, Col3",0)

Looking to create a Google App Script that duplicates a complicated sheet? Ideas?

In the end, I want to make a script that creates a folder that has other folders in it with a bunch of copies of a custom data sheet our school is using for data analysis.
As of now, I have created a whole system of Google Data Sheets that are connected through the IMPORTRANGE feature of Google sheets that our school uses to compare data. I would like to implement this system in other schools and wanted to try and write a Google App Script to set it up.
I have a couple of questions:
Is it possible to use a script to create a document is automatically set up to use the IMPORTRANGE feature to import data from another document?
If I have a sheet set up already (the standard data sheet we use) that I want to make 400 copies of in different folders, do I have to code the script to generate this document from scratch? Do I code it to pull a copy from somewhere? What do you guys think?
Does this even seem like something that's possible?
Thanks so much for your help guys!
Brandon
Sure. After you create the document, you'll just insert =IMPORTRANGE() using setFormula() or setFormulas(). You will have to manually grant permission for the sheet to import ranges the first time you open it, and any time after when you insert =IMPORTRANGE() with a reference to a new sheet, though.
This is no problem either. You can use the Drive Service and makeCopy() to copy a file into a destination folder you specify.

Uploading an XLSX converting and replacing a current spreadsheet

Just a general question, I would like to create a user upload form that would convert an .xlsx to the corresponding Google Sheets version and then replace a currently existing sheet on my drive. The main question and aspect that I'm not sure is achievable is replacing a current google sheet. Is a project like this even achievable in a reasonable manner? The reason I want to replace it is because the KeyID for that sheet is used in a couple other app scripts for a website. Thanks for the suggestions and advice.
Yes, this is possible. About being "reasonable", well... I think it is, it's not a single line script, but this is not the most simple task either.
But from what I understood from your use-case (other app script for a website), I think it's better if you enhance your other scripts to either look for the newest sheet on a given folder or fetch the ID from somewhere that you can update from the "form upload" script. Also, by doing this, you'll avoid getting inconsistent data in the middle of an update.

Linking Access records to Excel files

I've been trying to create a complete system using MS Access, but i really need to use the functionality of excel spreadsheets.
I wish to do the following; when I create a record, i create a directory for that record, and copy an excel spreadsheet to that directory.
The spreadsheet will be able to link to the corresponding record. So for example if I have a field 'Name' In the database record, the value of this field will show up on the excel spreadsheet.
Is it possible to do this?
It might help for you to explain your concept of "links" between Access rows and separate spreadsheets. That baffles me.
Rather than "link" each Access record to a separate spreadsheet, perhaps you could have the spreadsheet query the database to retrieve whatever updated information it needs.
Or use automation driven from Access to revise the spreadsheet.
Edit: To get start driving Excel from Access, look at Sample Excel Automation by Dev Ashish
Sounds overly complex and unmaintainable. Why not just embed a spreadsheet into your record?
http://support.microsoft.com/kb/209990