简体   繁体   中英

Can I scrape data from an embed excel worksheet on my web page to send to my SQL Server database

I am looking for solution to taking a template excel document and embedding it onto my website. After this users will use the template filling out certain cells. Is it possible for me to scrape a embedded excel sheet and use POST methods to send the data to my SQL Server database.

I want to embed the template because I need to change it from time to time, which means I love to have it easily changed within my code using the embed and iframe.

I have looked online and haven't found any solid documentation that this is possible.

I suggest that you start by thinking about the differences between data in an Excel spreadsheet and data in a normalised SQL Server database. For example, suppose you have a spreadsheet that you use to record downloads of "digital items" such as pdf files, word documents, .zip files, and so on. Each column represents a date and each row represents a digital item. So lest say Row 4 is for "The Cat Story.pdf" and Column 3 is for "15 February 2019. and Column 4 is for 16 February 2019 and so on. The value in Cell Row 4-Column 3 is "206", and the value in Cell Row 4-Column 4 is "327".

These two cells represent the following facts: Fact 1: The pdf "Cat Story" was downloaded 206 times on 15 Feb 2019. Fact 2: The pdf "Cat Story" was downloaded 327 times on 16 Feb 2019.

In an SQL Server database you could store such facts in a simple table called "Downloads" with Column 1=Item name, Column 2=Date and Column 3 = Number of downloads.

My longwinded explanation is to make it clear that in your case you are using an Excel spreadsheet as a tool to display data whereas the purpose of a well-designed SQL Server database is to store facts without any duplications.

After you have decided on a normalised design for your SQL Server database, you can link your Excel spreadsheet directly to the data in your database.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM