I have stored a list of country, capital, currency, area, population, prime minister, president in an excel spreadsheet and I want the user to choose a country from the dropdown list and then the other parameters(capital, currency, etc.) will be shown as output in a webpage. How can I do this in HTML?
use XLSX.js to extract the spreadsheet as arrays and do anything with the arrays that is extracted.
Related
I have created a React Native app and want a function where the user can specify in which city they live so that it can be shown to other users. It should be a text input where the user can search for a city and get a dropdown of choices to choose from. The city should then preferably be saved as an ID in our database that can be converted back to a localized version of the city for all users. Let's say someone lives in the UK it should say Gothenburg and if you live in Sweden it should say Göteborg. I have looked at the following options but none is optimal for us:
Google Places Autocomplete API to fetch the city, save the place ID in our database, and reverse geocode it. This becomes very expensive for us because it is a social app and each user would do approximately 20 geocoding requests when starting the app
Create a database with names of cities. This is not very scalable as you need to add new entries for each new country you want to support
Let users manually enter their city. This is prone to errors because users can write whatever they want
I would be happy to receive some suggestions on how to solve this issue.
Here are the things you currently want:
Provide your users an Autocomplete functionality
Get the city based on their selection
Save the city and store it on your database
provide users a localize text of the city they chose
For the third one, storing the city provided by the API may not be allowed by Google. I can see that you are aware of the terms, but here is the Service Specific Terms of what is allowed to be cached.
Depending on your use case tho, this can still be doable. In terms of pricing and efficiency, see this pricing sheet for your reference. Right now, you are doing Places Autocomplete and Reverse Geocoding the selection to get the City. You are actually paying a little more. Assuming that you are even using per session autocomplete, this is what you are paying for every 1000 request:
Autocomplete without Places Details - Per Session = $17.00 +
Geocoding API = $5.00
Total Cost: $22 per thousand calls
So instead of using Reverse Geocoding, you can instead use Place Details which serves the same purpose. The city can be retrieve on a Place Detail request which is under the Basic Data, with the Address Component field. See this link for the list of fields Place Details can retrieve. When retrieving fields with Basic Data, those are free of charge, unlike Contact and Atmosphere Data. So make sure to make use of the "fields" parameter for the Place Detail request that you will use as if you did not specify that, all Data will be retrieve and you will be charged accordingly. So if you use that with Autocomplete, your cost now will be:
Autocomplete (included with Places Details) - Per Session + Places Details + Basic Data = $17.00 per thousand calls
Now that you have the City, you would now want to present it in the customer's local language. Place Details contains the optional parameter "language". And by simply getting the customer's current language in the device, you can achieve this. Here is how you can get it for your reference.
For my school project, I need the data on this website:
https://services2.hdb.gov.sg/web/fi10/emap.html
Specifically, I need the longitude and latitude, address, flat type and the number of units of the flat type in csv or excel format so that I can do some spatial analysis.
How do I create an automated process to get all the data from the website and not clicking all the individual buildings?
Appreciate any assistance on this. Thank you.
I got a look at the network traffic when this site is querying it's data. There you can find the XHR-Requests where also the streetname and other things are written down. You may use this to collect your data.
I am looking for a method to extract data from the results cards of my school from board website and put them in excel sheet automaticaly, and all i need to tell the system a range of roll numbers,
For Example. i want results from www.fbise.edu.pk by putting roll number in search box and then it open the results stores it in excel , and then iterate through all the range i have given.
Is there any way to export HTML Fields from a web application to specific cells in a existing Excel Template. I am trying to create a web application that would be able to take information entered into it and create a excel sheet with those values. For example, I want to take the value from the Business Expense Allowance field shown below, and export it into the B9 field in a excel sheet, also below. How would I accomplish this?
I am creating a user interface that needs to read data stored in .dat files and plot this data onto a graph. The .dat files are created daily with information stored on per minute basis.
The user interface will allow the user to select a date for which they need data and plot that data in a graph.
File 1 has certain data and File 2 has certain data. I need to read certain data from both files and plot this data in a graph. The files are stored on two separate computers and are stored with names yyyymmdd_filename.dat. The user will select their day, and two other parameters listed in the files to graph.
For the purpose of this question, how would I be able to read the data if the files were stored locally and I simply wanted to pull the data and plot it.
Thanks!
If the data is always in the same spot in each file and the filenames are always the same, using the dropdown you could control the filenames in all subsequent cells.
The subsequent cells would all be made to reference the appropriate cell location in the other files on the network as long as they were always stored in the same folder.
In summary, map each field using cell references that are dynamically changed when you use the drop-down menu.
Ex. Cell A1 = 'C:\Reports[Budget.xlsx]Annual'!C10
Where A1 is the cell you want populated and C:\Reports\Budget.xlsx is the external filename and "Annual" is the sheet name within the file and C10 is the cell number within the sheet.