Here is some background:
I have a client that wants me to test a rails app against a large number of potential inputs in a form page. He has an Excel spreadsheet with about 200 potential input combinations that will be entered into the form.
The client want's the app to be able to "read" the spreadsheet and execute the couple hundred form submissions.
My solution was to just import the spreadsheet into a database table, but the client doesn't want an extra database table in the application.
So here is the question:
Is it possible/not exceptionally complicated to read/crawl a spreadsheet or csv file to do the above, or import data into only the test database?
I haven't been able to find any resources that aren't about simply importing the spreadsheet.
Thanks!
Use spreadsheet gem to read and parse your data from excel.
Use capybara to automate the form submission. Initial learning curve will be steep, but once you get a hang of it, it comes really handy to automate web interactions.
There is a ruby gem called roo which allows you to access the contents of:
Open-office spreadsheets (.ods)
Excel spreadsheets (.xls)
Google (online) spreadsheets
Excel’s new file format .xlsx
Using this gem, you can read test data from file and use them in tests to execute.
Do you have some magical method for importing the spreadsheet into the database already? Because the way I see it, you're going to have to parse the spreadsheet at some point anyway and there's no good reason to add overhead by throwing all of this into a database. Write a script that takes the entries and tries them, submission by submission, that way you won't need to store anything.
Related
I wish to enhance an existing web page by adding statistics that can be regularly fed by a large amount of people.
I chose to use Google Sheets to retrieve the data so that anyone can access the tables and make their addition but I have no clue of how to display the sheet's results in the concerned web page.
In my case, I'm editing the webpage's text from Javascript.
I thougth of two tools that might help:
Importing the google sheet in Javascript (I can't find how to do that, an alternative would be welcome if not possible)
Importing the google sheet in Python and then exporting its results as an internal .txt file which I should be able to read with Javascript but that would require the .txt file to be updated every now and then.
Could you guys lend me a hand in how to do this?
Thanks in advance!
I am trying to create a google sheet that updates and stacks the data from a Salesforce report on a daily basis. I tried to use the Data connector for Salesforce add, it exports the data just fine but when I change the date, it replaces everything it exported the first time. What I wanted it to do is to Extract the data today, store it in the sheet, and Export another time tomorrow adding the data to the existing one. I have no coding knowledge and SQL stuff and I'm trying to learn things to help my work.
Your response is highly appreciated
We have an ios app which uses firebase as database. We don't have configure server for the application. We are inserting, updating and getting data (records) from firebase storage (behaves like server). My requirement is i need to get one week records in excel or pdf format and send the file over email. Can we automate this process once in every week. Is there any possibility to execute some scripts in firebase console to automate this process.
Thanks in advance.
This question is asking multiple questions. In the future, try to stick to one per post as multiple questions can make answers very long and convoluted.
1) My requirement is i need to get one week records in excel or pdf
format
No, firebase does not have that as a direct option. Firebase is a JSON database and exporting (from the Real Time Data Base) will be json formatted text.
It's pretty straightforward get the data you want via a query for the Real Time Database or query for Firestore and then export it from your app into whatever format you like.
Note that Excel, Numbers.app, OpenOffice, other processing apps etc can read comma delimited files easily so that may be an option instead of creating a specific filetype. There are also a number of JSON 'converters' as well.
Lastly, Firestore exporting is supported through their managed export options which would enable data to be exported to BigQuery for example.
2) Can we automate this process once in every week.
Yes you can automate tasks to occur on a regular basis via a cron job and Firebase Cloud Functions.
There's a great Firebase Blog on Scheduling Cloud Functions for Firebase (cron) as well as additional reading in the Firebase Guide Schedule Functions
and for reference here's information about cron
I need to allow user upload excel (xlsx) file and then generate a Google Sheets file using Google Scripts (the generated file uses the input file values, process them with certain formulas and provides another excel file as output based on all processing)
I am currently doing the task in a simple desktop application (using MS Excel etc.), but problem is I have admin rights and I want other people to do the same on their PCs but they dont have admin rights, so please help me with this, whats the best way I can implement it via Google Sheets. I need following to do:
Get an XLSX file from user
Read two columns using google sheet script.
Process the read values and create a new google sheet file with 6/7 columns
Plz help as I am not looking for a ready made code but a head start, as I have never worked with google scripts before.
First you need to study the basics of Apps Script in general, and of the SpreadsheetApp, DriveApp and Advanced Drive Service in specific.
The steps to write your code would be
retrieving the excel file on your Google Drive
retrieving its blob
creating a new file of the mimeType GOOGLE_SHEETS with the contents of your blob
Once you create a Google Spreadsheet - process it with the SpreadsheetApp methods to delete spare contents/ create a copy with only the desired contents.
Here you can find useful samples.
Note: It might make sense to retrieve the columns of interest before
converting them to Google Sheets, but this is not something you can do
with Apps Script or a Google API since they do not have methods to
edit Excel files.
A company is creating a web site for the organization I work for. Since the web site is still being developed, some modules are not yet there. For instance, in order to print data obtained from a query, one needs first to export it to Excel or Access. Then, from Excel or Access, it is important to do some adjustments (adjust columns width and rows height, modify titles, so on) to make it easy to print.
I would like to create a small web application that will avoid us doing those operations manually. Unfortunately, the other application is in JSP/Java while I only know ASP.NET/C#.
How can I retrieve all this data, which are either in Excel or Access, and reload them into my application for printing?
Thank you
This guy did a brilliant article on getting data from excel using ado.net, I have written a program based on his instructions and it is working fine with Excel 2007 files, and can handle very long column data as well.
Link to article
Have you considered writing a macro in Excel instead of trying to do everything on the server? Creating a macro in VBA isn't difficult, and you can distribute it as an Add-In to your users. Takes some good instructions for them to install it, but avoids all the potentially messy issues of import/export of Excel files.