javascript - Excel/CSV connection with site
问题描述
I am making an e-shop that has to be connected to an excel or CSV file.
More specifically I need to connect excel rows to input boxes (prices,bottles,etc). All those inputs will be connected to an input slider(type=range)just like the JS below.
I have researched this matter very much and someone told me I need to use XML. I can't use pure JS/Python because it needs to be updated constantly and I am completely clueless as to how I should proceed. Let me know if anything is not clear.
Thanks in advance.
<script>
var city = document.getElementById('city')
var cityrepeat = document.getElementById('cityrepeat')
var state = document.getElementById('state')
var staterepeat = document.getElementById('staterepeat')
function setCity() {
cityrepeat.value = city.value
}
function setd() {
city.value = cityrepeat.value
}
function setState() {
staterepeat.value = state.value
}
</script>
City
<input id="city" type="text" onChange="setCity()" size=5/></br>
State
<input id="state" type="text" onChange="setState()" size=5/></br>
City repeat
<input id="cityrepeat" type="range" min="1" max="100" onChange="setd()"/>
<br>
State repeat
<input id="staterepeat" type="range"/>
解决方案
您可以将表单数据发送到后端,然后从那里将其写入 xls/csv 文件。由于您使用的是python,您可以在此处查找包
推荐阅读
- python - 在python的while循环中创建固定大小的数组
- butterknife - 如何解决黄油刀库的这个错误?
- python - 用于提取最接近日期的 SAR 数据的 Python API
- facebook - 仅使用开发人员帐户的 Facebook 登录问题
- javascript - 无法从此 API 检索数据
- python - 逻辑回归,除以零的错误
- python - 尝试使用 pywin32 打开 MSProject mpp 文件时出现“项目无法打开文件”
- amazon-web-services - Golang函数参数中的函数数组
- python - 在更新表单之前,如何在表单中显示一行的 db 值?
- typescript - !:感叹号冒号