Tag: web应用程序

在VBA中使用XMLHTTP从多个页面parsing/刮取

下面的代码只抓取/parsing一页数据(50结果)到Excel中,但是,我想它刮了多个页面(500结果) – 请帮助。 (Base64Encode是从另一个来源采取的 – 我不赞赏它) `Function GetData() As Boolean Application.ScreenUpdating = False Dim objHTTP As New MSXML2.XMLHTTP Dim strURL As String Dim strUserName As String Dim strPassword As String Sheet1.Range("A2:R2000") = "" Sheet1.Activate strUserName = "User" strPassword = "Password" For i = 1 To UBound(MyArray) strURL = "https://.ngx.com/ngxcs/indexPrice.xml" objHTTP.Open "GET", strURL, False objHTTP.setRequestHeader "Authorization", […]

从Web服务获取Excel工作表的字节数组并将其显示在HTML中

我需要在HTML页面中显示Excel工作表,但是Excel工作表不在本地存储中,而是来自Web服务。 我可以从下面的Web服务获取Excel工作表作为字节数组。 @Path("/getGuruHoldings") @POST @Produces(MediaType.APPLICATION_OCTET_STREAM) public byte[] getGuruHoldings(@FormParam("guruId") String guruId) { String response = "SUCCESS"; int guru = Integer.parseInt(guruId); List<GuruHoldingDTO> list = guruService.getGuruHoldings(guru); ExcelCreateHelper createHelper = new ExcelCreateHelper(); /** method to convert list values into excel sheet byte array */ byte[] fos = createHelper.guruHoldingExcel(list); return fos; } HTTP://本地主机:8081 / myguru / gurudata / getGuruHoldings 我可以从这个链接获取Excel表单字节数组。 […]

如何处理在Excel中同时刷新多个外部数据源?

所以我有一个有四个外部数据源的Excel表,数据是来自我的经纪商网站的实时股票报价和其他信息。 问题是我的经纪商网站只允许每个观察名单增加最多50只股票,但是我有超过150只股票来跟踪,所以我做了4个这样的观察名单,但问题是现在需要更多的时间,当数据每分钟刷新(我也将这些数据存储在Excel中),处理不够stream畅。 修改公式或进行任何编辑也是非常麻烦的,因为我必须等到刷新结束。 有没有办法让excel中的所有四个观察列表同时刷新,以便处理更快?

如何添加Excel Online的插件?

我想从浏览器使用Excelfunction。 我目前有一个基于Excel的微软办公应用程序。 它为function区添加了一个图标,并执行基于C#的自定义应用程序逻辑来与数据库服务器进行通信。 由于它需要应用程序版本的架构中的任何变化,我很好奇,如果我可以将其转换成一个Web应用程序,仍然受益于Excel的内置function。 我期望这是可能的,因为Microsoft Excel Online在浏览器中运行。 我的问题是,是否可以添加插件到这样的在线excel文档? 如果是的话,任何例子将不胜感激。

在Excel中使用input参数调用Web服务

我开始使用Web服务 我试图发送一个XML请求的Web服务在oXmlHttp.send xmlInput但我得到一个错误在oXmlHttp.send xmlInput :MSXML“系统找不到指定的资源” Sub testar() Dim xmlInput As String xmlInput = "<admitirTrabalhador><trabalhador>11111111111</trabalhador><modalidadeContratoTrabalho>E</modalidadeContratoTrabalho><dataInicioContrato>2016-12-26</dataInicioContrato><dataFimContrato>2016-12-26</dataFimContrato><retribuicao>540.60</retribuicao><diuturnidades>1</diuturnidades></admitirTrabalhador>" Dim oXmlHttp As MSXML2.XMLHTTP60 Set oXmlHttp = New MSXML2.XMLHTTP60 oXmlHttp.Open "POST", "https://pregfct.seg-social.pt/ws/gfct/admitirTrabalhador?wsdl", False, "2222222222", "XXXXX" oXmlHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" oXmlHttp.send xmlInput Debug.Print oXmlHttp.responseText Dim oXmlReturn As MSXML2.DOMDocument60 Set oXmlReturn = New MSXML2.DOMDocument60 oXmlReturn.LoadXML oXmlHttp.responseText End Sub 如何将请求XML作为input参数发送给admitirTrabalhador方法? 对不起我的英语不好。

在Django中使用html表格上传Excel文件

我正在学习Django框架,并试图读取一个Excel文件 我想上传文件使用HTML表单(POST方法),并希望在Python中读取计算,所以我该怎么做,真的很困惑? 代码在这里form.html <form method="POST" action="minmax_ans.html">{% csrf_tocken %} {{form.as_p}} <p><b><h2>Upload File</h2></b><p> <input type="file" name="file" value="{{ source.title }}"> <input type="submit"> </form> views.py def upload_file(request): if request.method == 'POST': form = UploadFileForm(request.POST, request.FILES) if form.is_valid(): handle_uploaded_file(request.FILES['file']) return HttpResponseRedirect('/success/url/') else: form = UploadFileForm() return render(request, 'upload.html', {'form': form}) 我想做一些计算,使用通过HTML格式上传的文件中的数据,如果它是一个Excel文件,并显示结果result.html我还没有创build,因为我不能读取文件

Python:在以下位置被忽略的exception:<绑定方法服务.__删除了<selenium.webdriver.chrome.service.Service对象在0x0000015937CEA128 >>

使用的代码: from selenium import webdriver from bs4 import BeautifulSoup from urllib.request import urlopen from urllib.parse import urlparse import requests, bs4 res = requests.get('http://www.iceomatic.com/Products/Ice-Machines/Cubers/') icesoup = bs4.BeautifulSoup(res.text,'lxml') selectElems = icesoup.select('li') len(selectElems) type(selectElems[0]) selectElems[0].getText() 主要目标是将不同产品的数据转化为Excel表格。 我刚开始工作。 尝试创buildhtml对象进行进一步处理。 以下是输出: Exception ignored in: <bound method Service.__del__ of <selenium.webdriver.chrome.service.Service object at 0x0000026E252CA128>> Traceback (most recent call last): File "C:\Users\Santosh\Anaconda3\lib\site- packages\selenium\webdriver\common\service.py", […]

通过Web服务validationExcel数据或连接到SQL Server

我想为我的用户提供一个Excel模板,假设他们将特定的数据input到特定的单元格中。 如何设置电子表格,以便validation其针对Web服务input的值,以便仅允许input有效值? 更新:我为我的用户提供了一个excel(通过C#代码生成),它具有以下列(“用户名”,“名字”,“中间名”,“姓氏”,“联系人”,“电子邮件”等) 。 目前我所做的是我要求他们上传该excel,一旦他们上传我遍历该excel和validation数据对我的数据库:例如:input用户名,联系人和电子邮件应该是唯一的,不应该存在于我的数据库。如果input的数据是有效的,我更新我的数据库中相同的其他提示信息“validation错误”。 我的问题是:有什么办法可以通过C#生成一个Excel模板,应该连接到我的Azure SQL数据库,我应该能够validation用户的input对应于每个列如“用户名”,“联系人”等他们进入它的那一点….所以我可以稍后跳过validation过程…因为这将更加用户友好。 提前致谢。

Python Web Scraper / Crawler – HTML Tables to Excel Spreadsheet

我试图做一个网站刮板,将从网站拉表,然后将其粘贴到Excel电子表格。 我是Python的EXTREME初学者(一般编码) – 几天前从字面上开始学习。 那么,我该如何制作这个网页抓取工具? 这里是我有的代码: import csv import requests from BeautifulSoup import BeautifulSoup url = 'https://www.techpowerup.com/gpudb/?mobile=0&released%5B%5D=y14_c&released%5B%5D=y11_14&generation=&chipname=&interface=&ushaders=&tmus=&rops=&memsize=&memtype=&buswidth=&slots=&powerplugs=&sort=released&q=' response = requests.get(url) html = response.content soup = BeautifulSoup(html) table = soup.find('table', attrs={'class': 'processors'}) list_of_rows = [] for row in table.findAll('tr')[1:]: list_of_cells = [] for cell in row.findAll('td'): text = cell.text.replace('&nbsp;', '') list_of_cells.append(text) list_of_rows.append(list_of_cells) outfile = open("./GPU.csv", "wb") […]

从Web服务导入Excel 2016 XML数据需要双重更新才能执行更新

尝试将XML数据导入到Excel 2016时遇到一个奇怪的问题。 我有一个用C#创build的符合XML标准的Webservice。 在Excel 2016中,我使用“数据” – >“从互联网” – >“粘贴URL到Web服务”。 当我完成Excel导入对话框时,我从Web服务中获得了一个很好的表格数据。 但是,当输出在Web服务中发生变化时,当右键单击数据表时input“更新”选项 – 数据不会在数据表中更新! 如果我重复并再次单击更新(完全相同的操作) – 数据表中的数据更新… 任何人都知道如何克服这种奇怪的行为? 作为参考,我也尝试点击更新并更新所有在数据下的function区,并尝试任何可能的组合下的连接属性 – 无济于事。 而且我也尝试在浏览器中重新加载XML – 在这里数据会立即更新 – 所以它似乎没有涉及到caching。 我可以看到Excel在第一次运行时很快写入连接 – 但是没有更新发生。