Create a web form I can paste excel rows/columns into - javascript

How do I create a web form that accepts input that would be copied and pasted from Excel? Basically, I have a table on my website I use for managing my project every now and then it makes sense to just copy and past a section from excel and paste it into the website. However standard form fields just put all the values inside one input.
Is there a way to set up a form with rows and columns that would accept values from Excel and parse it into the same structure in rows and columns to be updated on my website?

Related

Displaying data from excel spreadsheet on website - javscript or php+mysql?

I am currently working on a website, and would like to display data from an excel sheet on it.
Excel sheet format:
Each row contains an 'item', and each column contains properties of that instance of the item.
What I'm trying to do:
I'm trying to display an item (row in excel sheet of columns that I pick) one at a time to a user from the sheet, and upon clicking left or right buttons, it goes to the next or prev item.
I'd like to only display certain properties, so I'm not using all cols in spreadsheet(so if a row had an image in col A, a name in col B, and a summary in Col 3, etc)
So, my question:
How should I go about implementing this into my website?
I have read its possible use javscript to import excel data and manipulate it (so I guess I'd instantiate an object which contains the data I need from the sheet and display it on the website, each time the user clicks I would just replace the object)
I also read about importing the excel sheet into a database (mySQL), and then getting the data from the database and instantiating the object that way with PHP. I haven't learned SQL yet, but I read it's not too complex for simple things and I do plan on learning it regardless.
Thanks for any suggestions!
This thread may help you:
How to parse Excel (XLS) file in Javascript/HTML5
Personally, I hate working with excel sheets and convert them to csv whenever I can. Then parse the csv and convert the rows to JSON format.

Do I need a javascript to convert an imported CSV field to a list in an Acrobat PDF?

I created a PDF using Acrobat. It includes a List field to which I've mapped a CSV file. The field is populated by an Solutions Business Manager (Micro Focus) form widget. The field appears in comma-delimited form when the PDF is opened. Do I need to apply a javascript in the Acrobat Prepare Form function, in the field Properties dialog box, in order to display the values as a List? And where would I find such a script?
A javascript worked on the SBM side. The relevant command is:
var newListValue = commaDelimValue.replace(/,/g, '\n');
I'm guessing that on account of whatever SBM process writes the content to the PDF, the usual javascript in the PDF Format tab won't work.

How to insert dropdown or checkbox in Excel using Javascript API?

I'm following the doc (https://dev.office.com/reference/add-ins/excel/excel-add-ins-reference-overview) to build an Excel add-in. The add-in needs to populate an Excel table column with either dropdown or checkbox for the user to select actions to be done on the table row. I can't seem to find any API to insert dropdown/checkbox in Excel spreadsheet. Could someone advise how I could do that? Thanks!
UI controls such as text box, check box, button, etc. are not supported in Office-js. You'd instead need to accept such user inputs within your task pane or dialog box. Alternatively, you could accept inputs within Excel cells as well (though that is bit hard) and drop down values within cells can be included using data validation API (still in beta) to help with controlling input values.
Try getting the cell and calling
cell.dataValidation = {
type: 'list',
allowBlank: true,
formulae: ['"Selected,Rejected,On-hold"'],
};
based on How to add data validation list in excel using javascript

Get selected cell value, row, and column from Excel

Just looking to be pointed in the right direction about how I should do this.
Background: Creating a program which will automatically fill out excel pricing files for our customers from our database based on the UPC. However, there's over a hundred different sheets because customers want them sent in their own format. Some in very weird formats. I don't want to hard code the columns/locations for UPC, price, etc. (sections that need to be filled out), as the sheets sometimes change and we get new customers. Therefore, I'm going to put the power in the users hands to map the locations of the UPC column, etc. I currently use excel interop in C# to do the excel file reading/filling out, however the mapping user panel is what I need help with.
What I would like to do: I'm comfortable with modifying an excel file in the background. However, I would like the mapping to work as such. I could easily say: "UPC Column Header" and the user puts in B10 in a text box and so on. What I would rather do is have the previous mappings for that customer in the text boxes, a check to see if the text is the same (same cell text value as before), and then an error if the column header cell text doesn't match the previous mapping stored in a db. I'm fine and dandy with the database portion to store/check the mappings, but here is my conundrum... and I may be putting more work on myself.
The conundrum is: I would like the user to be able to view the selected excel sheet and click on a cell to select a new mapping in the program, or to map a new excel sheet. So it would say: "Click the UPC header," and so on in order to fill out the mapping form. How would you go about this?
I'm a C#/ASP.NET web developer with decent Javascript experience and would like to keep it as a web app (to avoid having to update the program based on my changes for the user). However, I'm willing to go down different avenues/languages.

Make edits on dynamically loaded data using jQuery and PHP

I have a dropdown, on its change I need to load the contents related to it on the same page. Which I did using jQuery. Now the question is how do I make edits on this data and store it on my database. If I am wrong in using jQuery for loading my data then what else should I use? I am using PHP as my server side scripting language.
More detail -
Simply taking there a list of details I need to display as per the country you select, which I am displaying currently in a nice grid(textboxes)!
Now the data from this grid should be copied to another textbox on "EDIT" button click from where I edit them and store it in my database. I am not able to make the values copy into a another textbox
You could do this:
Display the data in some form of editable div, textarea, or other element.
Make a hidden field somewhere and when you display the data
Set the row id from your database to the hidden field
On your change event, grab the id from the hidden field along with the edited data.
Using Jquery/ajax, send that data to a php page that will save thee data to your database using the passed in id.
You could do that.
However, if it were me (and if you're not married to your current databse / mySQL etc..), I would use parse.com. The service is free up to a significant amount of usage (which Ive never come close to) and it really simplifies everything. See the below post if you're interested in that approach:
Save and retrieve user input from database with javascript?

Categories

Resources