I see we can import json files into firebase.
What I would like to know is if there is a way to import CSV files (I have files that could have about 50K or even more records with about 10 columns).
Does it even make sense to have such files in firebase ?
I can't answer if it make sense to have such files in Firebase, you should answer that.
I also had to upload CSV files to Firebase and I finally transformed my CSV into JSON and used firebase-import to add my Json into Firebase.
there's a lot of CSV to JSON converters (even online ones). You can pick the one you like the most (I personnaly used node-csvtojson).
I've uploaded many files (tab separated files) (40MB each) into firebase.
Here are the steps:
I wrote a Java code to translate TSV into JSON files.
I used firebase-import to upload them. To install just type in cmd:
npm install firebase-import
One trick I used on top of all the one already mentioned is to synchronize a google spreadsheet with firebase.
You create a script that upload directly to firebase db base on row / columns. It worked quite well and can be more visual for fine tuning the raw data compared to csv/json format directly.
Ref: https://www.sohamkamani.com/blog/2017/03/09/sync-data-between-google-sheets-and-firebase/
Here is the fastest way to Import your CSV to Firestore:
Create an account in Jet Admin
Connect Firebase as a DataSource
Import CSV to Firestore
Ref:
https://blog.jetadmin.io/how-to-import-csv-to-firestore-database-without-code/
Related
Hello i try to set up automate cron import to prestashop using excel power query table. The problem is i have table edited at my computer fetching data from external source. I need to write a script in PHP that will refresh the xlsx file before sending it to import php.
Now the steps are, Open Excel, Press Refresh All, Save, Upload to FTP, Run Import.
I want to automate these steps for PHP.
Thank you.
I'd like to be able to upload a new spreadsheet to my drive remotely from my server as needed (using Google's PHP Drive API, say), and it to trigger to run once daily at a given time, then read that spreadsheet remotely once a day after the script runs. I want to fully automate this. I don't want to have to manually install the sheet and set up the trigger for each.
The guides, API, tutorials I've found have not been very clear about how to specifically upload a spreadsheet with an associated script and set triggers. Is this possible? And how do I go about it? If there are some good resources I've missed, much appreciate pointing me to them.
Thanks.
There is no way yo "upload" a Google spreadsheet from a local server since they are online documents. You could use a template that has an embedded script but the script would require authorization to run so it won't fit your requirement neither.
Why don't you use a standalone script (or an embedded script in a "master sheet") that would do what you need to do in all the spreadsheets you create (or even upload/convert from ods or excel files with data) ?
One single script can access any number of spreadsheets and do about everything an embedded script can do in these sheets while requiring only one single authorization. This script could create the files and work on a daily timer to do the job.
I have a client that has developed an Excel spreadsheet to calculate various statistics using VBA Script (Excel/VBA is not my forte to say the least). He wants me to create a web front-end for this (I will be using PHP / CakePHP) that will have a simple form for inputting cell values, will query the spreadsheet and return the values for display on the website.
The client does not want to convert the Excel/VBA script to another language - he wants to keep it in a 'silo' and just have the website query the existing script.
Is this possible? Any libraries that can help? How could I go about this?
You'd need to run MS Excel itself, and use COM... it's the only method of which I'm aware that would allow you to run VBAScript within the Excel workbook from your PHP. You couldn't even use OpenOffice for this, so it limits you to a Windows Server with MS Excel installed
I know there are similar questions to this, but I never found a solution to match my case.
so my problem is i have a large file like 130MB with .txt extension.
now I want to upload this file to mysql database.
now I have problem uploading this file it gets timeout, using phpmyadmin.
is there a good way to upload this file using php?
or is there any other way besides those?
Access your server via the console (ssh, telnet, etc) and import the file using the native cli client load data syntax to import your file data:
http://dev.mysql.com/doc/refman/5.1/en/load-data.html
Edit: updating answer based on comments.
Since you can't access mysql via a CLI, i would suggest uploading the text file via ftp, then making a quick php script to import the file via a simple db connect + insert statement..
also use set_time_limit(0) to ensure the script doesn't timeout while executing the query..
You'll also need to make sure you have enough ram available to load the file.
I want to connect Excel to my web site, as an external data source, and thereby run reports on the data that is fetched from my website. I have heard that this should be possible to do and Excel seems to support it, but I have little knowledge on how I actually should build the backend on my PHP server to serve the data. How do I do it?
I am well aware of the fact of being able to create and read Excel files on a PHP server, but that's not what I am after.
Excel supports IQY, internet queries.
You may define one in excel pointing at your webserver and get the data right into excel.
You may use formatted html-tables at your server. Colors will be preserved.
the iry-format is described at:
http://support.microsoft.com/kb/157482
and supports both post/get and parameters.
regards
//t