Tag: web应用程序

如何在刮取时检查getelementById中的部分string匹配

我需要得到这个ID的价值:“价格含税9926” <span class="price-including-tax"> <span class="label">Incl. Tax:</span> <span class="price" id="price-including-tax-9926"> £70.21 </span> </span> 这是网站 这是我迄今为止所尝试的: Sub GetPriceData() Dim IE As New InternetExplorer Dim doc As HTMLDocument Dim wk As Worksheet, frow As Long, urL As String, i As Long Set wk = Sheet1 frow = wk.Range("B" & Rows.Count).End(xlUp).Row For i = 2 To frow urL = […]

System.Net.WebException:请求失败,HTTP状态404:未find

由于项目需要,我正在从Windows 2003到2012R2进行服务器迁移。 应用程序一直与旧的服务器正常工作。 但是,当我部署应用程序在一个新的服务器,奇怪的部分(Part1,第3,5,7,9等)工作正常。 但是偶数部分(part2,4,6,8等)不能正常工作,显示下面的错误。 这意味着它不是击中Web服务,所以显示错误。 请build议如何解决这个问题。 在这里input图像说明

使用Excel VBA在JavaScript web中selectonchange值

我对VBA很新,我已经尝试了很多次,使用Excel VBA来select网站上的值,但是它不起作用。 以下是我使用的代码。 其实我不知道如何得到元素,因为它没有“id”或“name”标签。 Sub GetFinanceData() Dim URL As String URL = "http://stock.finance.sina.com.cn/hkstock/finance/00001.html" Set myIE = CreateObject("InternetExplorer.Application") With myIE .navigate URL .Visible = True Do While .Busy = True Or .readyState <> 4 Loop DoEvents .Document.parentWindow.execScript "selectData(zero);", "JavaScript" End With End Sub 下面是HTML代码,打开网站时我想把选项值改为“零”,任何人都可以帮忙查看和build议我可以用什么VBA代码来得到值“零”? 提前感谢! <a name="a1" id="a1"></a> <div class="part02"> <div class="sub01"> <div class="sub01_tt fblue"> <span […]

Excel插件为ASP.NET应用程序

我正在处理一个ASP.NET应用程序。 我想embedded/显示(如果可能的话)一个Excel文件到应用程序(在我的浏览器中),使得它的所有function,如添加expression式和filter,都存在。 这是一个基于云的应用程序,我更喜欢开源(OpenOffice?)解决scheme。

无法在Excel文件中正确写入提取的项目?

我已经写了一些代码在pythonparsing标题和链接从一个网页。 最初,我试图parsing左侧栏中的链接,然后通过追踪每个链接来抓取每个页面上的上述文档。 我完美无瑕地做到了这一点。 我试图将不同页面的文档保存在一个excel文件中。 但是,它创build了几个“表格”,从我的脚本的标题variables中提取所需的部分作为表格名称。 我面临的问题是,当数据被保存时,只有链接中每个页面的最后一个logging保存在我的Excel表格中,而不是完整的logging。 这是我尝试的脚本: import requests from lxml import html from pyexcel_ods3 import save_data web_link = "http://www.wiseowl.co.uk/videos/" main_url = "http://www.wiseowl.co.uk" def get_links(page): response = requests.Session().get(page) tree = html.fromstring(response.text) data = {} titles = tree.xpath("//ul[@class='woMenuList']//li[@class='woMenuItem']/a/@href") for title in titles: if "author" not in title and "year" not in title: get_docs(data, main_url + title) […]

在Excel-VBA / SQL上:用户“testuser”login失败

在Excel-VBA上,我试图连接到Amazon AWS / RDS(免费层)上的SQL Server。 我所得到的是: 运行时错误“-2147217843(80040e4d)”:用户testuserlogin失败。 我的代码: Dim conn As New ADODB.Connection Dim rst As New ADODB.Recordset Dim ConnectionString As String Dim StrQuery As String ConnectionString = "Provider=SQLOLEDB;Data Source=***sqlserver_instance***.amazonaws.com,1433;Initial Catalog=TESTDB;User ID=testuser;Password=testpassword;" conn.Open ConnectionString StrQuery = "SELECT * FROM TestTable WHERE ThisField = '" & Sheets("ThisSheet").Range("ThisValue").Value & "'" rst.Open StrQuery, conn Sheets("AnotherSheet").Range("A1").CopyFromRecordset rst 我可以连接,pipe理数据库并使用SQL Server […]

在ASP.NET中的Web服务器上填写excel电子表格比interop更好的方法?

有没有更好的办法,我可以填写在Web服务器(使用asp.net)的电子表格比使用interop? 编辑:我不是很清楚,我需要什么: 我有一个模板,我必须使用由我们的客户提供的。 在模板中是一些密码保护,我没有访问,所以我不能生成Excel文件的macros。 我卡住更新2003年的Excel文件。

无法通过使用VBA的SOAP请求获取来自webservice的响应

我一直在尝试使用VBA创build一个SOAP请求,但是每次我得到一个空白的响应。 请find下面的代码。 WSDLurl: http : //productavailabilityfeed.xxxx.com/Availability.svc?wsdl Dim sURL As String Dim sEnv As String 'Set and Instantiate our working objects Set objHttp = CreateObject("MSXML2.XMLHTTP") sURL = "http://productavailabilityfeed.xxxx.com/Product.svc/soap" ' we create our SOAP envelope for submission to the Web Service 'sEnv = "<?xml version=""1.0"" encoding=""utf-8""?>" 'sEnv = sEnv & "<soap:Envelope xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope"">" sEnv = "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:tem=""http://tempuri.org/"">" […]

从没有保存到文件系统的上传的Excel文件获取数据

我有一个要求,允许此ASP.NET Web应用程序的用户上载特定格式的Excel电子表格,填充电子表格中的数据数组,并将数组绑定到Oracle存储过程进行validation和插入数据库。 我必须能够从Excel电子表格中读取数据,而不能将其保存到Web服务器的硬盘上。 这是我无法弄清楚如何去做的部分。 这是一个简单的代码示例。 <%–ASP.NET Declarative–%> <asp:FileUpload ID="FileUpload1" runat="server" /> <asp:Button ID="Button1" runat="server" Text="Send File" OnClick="Button1_Click" /> // C# Code-Behind protected void Button1_Click(object sender, EventArgs e) { var postedFile = FileUpload1.PostedFile; // … Read file in memory and put in format to send to stored procedure … } 谁能帮我这个? 我感谢任何人的考虑。 谢谢, 加布