Tag: html

如何将checkbox的值携带到一个php页面并输出一个.xls文件?

我试图从checkboxselect下载MySQL数据库的内容和button单击Excel格式。 该程序正在工作。 但问题是我只得到一个值而不是整行。 excel文件上的错误显示查询行上的未定义索引。 <form action="connect.php" method="POST"> <table class= "table table-condensed table-striped"> <thead> <tr class="warning"> <th></th> <th>Delivery No.</th> <th>Invoice Number</th> <th>Bill Date</th> <th>Customer</th> <th>Quantity</th> <th>Brand</th> </tr> </thead> <?php while ($row = mysql_fetch_array($filter_result)){ ?> <tr> <td class="border-right" align="center"><input type="checkbox" name="check[]" id="check[]" value= "<?php echo $row['Delivery_no']; ?>" /></td> <td><?php echo $row['Delivery_no'];?></td> <td><?php echo $row['Invoice_no'];?></td> <td><?php echo $row['Bill_date'];?></td> […]

如何在HTML正文中插入Excel表格并通过Gmail发送

我pipe理创build一个通过使用VBA代码通过Gmail发送电子邮件的代码。 我的下一步是在HTML主体中插入一个范围。 你能帮我吗? 代码: Sub Send_mail() Dim myMail As CDO.Message Set myMail = New CDO.Message myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com" myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465 myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "xxxx@xxxx.com" myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "xxxxx" myMail.Configuration.Fields.Update Dim strHTML strHTML = "<HTML>" strHTML = strHTML & "<HEAD>" strHTML = strHTML & "<BODY>" strHTML = strHTML […]

VBA – 通过标签属性提取值

我一直在使用下面的代码来从网页中提取值。 Private Sub Update() Dim IE As New InternetExplorer IE.Visible = False IE.navigate "cisco.com/" & Range("srNum").Value Do DoEvents Loop Until IE.readyState = READYSTATE_COMPLETE Dim Doc As HTMLDocument Set Doc = IE.document Dim sTag As String sTag = Doc.getElementById("caseheader").innerText Sheets.Add ActiveCell.Value = sTag End Sub 我现在正在一个新的页面,我需要通过属性“标题”拉值。 在下面的例子中,我需要find属性“标题”的值“优先”,然后返回“P3”的值。 <div class="con-LFloat con-RAlign con-Priority Width25"> <span class="con-text-bold Width20 con-RAlign">Priority […]

在Excel VBA中自动化邮件合并 – 不发送多个电子邮件

这是一个自动邮件合并,我从几个不同的网站拼凑在一起。 它已被多次更改,以确保发送的电子邮件是HTML并包含默认用户签名。 点击button后,popup一个窗口select一个范围,电子邮件然后根据范围select个性化。 Sub EmailAttachmentRecipients() 'updateby Extendoffice 20160506 Dim xOutlook As Object Dim xMailItem As Object Dim xRg As Range Dim xCell As Range Dim xTxt As String Dim Signature As String Dim xEmail As String Dim xSubj As String Dim xMsg As String Dim i As Integer Dim k As Double ' Create window […]

在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,因为我不能读取文件

使用java删除excel文件中列的HTML标签

我正在使用Java代码从文本文件中删除HTML标记。 但我的要求是,我想访问使用Java的Excel文件,并从特定列的每一行删除HTML标签。 我怎样才能访问使用JavaScript的Excel文件,以及如何将我的Java代码(删除HTML标签)到… import java.io.*; import java.util.logging.Logger; public class Html2TextWithRegExp { private Html2TextWithRegExp() {} public static void main (String[] args) throws Exception{ StringBuilder sb = new StringBuilder(); BufferedReader br = new BufferedReader(new FileReader("java-new.txt")); String line; while ( (line=br.readLine()) != null) { sb.append(line); } String nohtml = sb.toString().replaceAll("\\<.*?>",""); System.out.println(nohtml); try( PrintWriter out = new PrintWriter( "nohtml.txt" […]

HTML表格为Excel图像有损坏的链接

我有一个HTML表,并试图添加一个下载到我的网站的Excelbutton。 我有这个下载工作。 function fnExcelReport() { var tab_text="<table border='2px'><tr>"; var textRange; var j=0; tab = document.getElementById('main-table'); for(j = 0 ; j < tab.rows.length ; j++) { tab_text=tab_text+tab.rows[j].innerHTML+"</tr>"; } tab_text=tab_text+"</table>"; tab_text= tab_text.replace(/<input[^>]*>|<\/input>/gi, ""); var ua = window.navigator.userAgent; var msie = ua.indexOf("MSIE "); if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) { txtArea1.document.open("txt/html","replace"); txtArea1.document.write(tab_text); txtArea1.document.close(); txtArea1.focus(); sa=txtArea1.document.execCommand("SaveAs",true,"Say Thanks to Sumit.xls"); […]

无法读取新页面HTML Excel VBA

在前一页inputsearchvariables之后,我试图从结果页面获取刮取的数据。 我不能得到.doc HTML来反映新的页面的HTML,(不一致,5-10%的情况下正确读取)。 我已经看了这个问题的其他解决scheme,大多数归结为不等待新的页面html出现,但我已经把5,10甚至二十秒等待,但似乎并没有把戏。 任何build议/指针将受到欢迎 <code>Sub ParseInternet() Dim post_code As String Dim house_num As String post_code = CStr(Sheet1.Cells(9, 2).Value) 'get search data from worksheet house_num = CStr(Sheet1.Cells(9, 1).Value) If post_code = "" Then MsgBox ("House Name /Number and postcode MUST be entered") Exit Sub End If Set site = CreateObject("InternetExplorer.application") Dim url As String url […]

Excel VBA:导航到新页面时,网页HTML不显示

我试图在Excel中创build一个VBAmacros: 导航到网页 在HTML文档中search标签名称为“input”的所有元素 打印find的每个元素的属性(名称,types和值) 点击网页上的button导航到第二个网页。 在第二页的HTML文档中search标签名称为“input”的所有元素 打印find的每个元素的属性(名称,types和值) 一切工作,直到第5步find。当我尝试searchHTML文档时,出于某种原因,它不search第二页的HTML文档,而是查看第2步中的初始网页的HTML,并打印出步骤3中的结果相同。 请你们看看我的代码,看看我做错了什么? 我在下面列出了我的代码,并试图发表评论,使其可读性。 Sub C_R() Dim ie As New SHDocVw.InternetExplorer Dim HTMLDoc As MSHTML.HTMLDocument Dim HTMLInput As MSHTML.IHTMLElement Dim HTMLButtons As MSHTML.IHTMLElementCollection Dim HTMLButton As MSHTML.IHTMLElement 'Opens Internet Explorer and navigates to website. ie.Visible = True ie.navigate "http://openaccess.sb-court.org/OpenAccess/" Do While ie.ReadyState <> READYSTATE_COMPLETE Loop 'Searches HTML(initial page) to […]

将Excel工作簿保存为HTML在Windows 10中不起作用

将Excel工作簿保存为HTML在Windows 10中无法正常工作。在Windows 7中工作正常。 码: Imports Excel = Microsoft.Office.Interop.Excel Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim xlApp As Excel.Application = New Microsoft.Office.Interop.Excel.Application() Dim xlWorkBook As Excel.Workbook Dim xlWorkSheet As Excel.Worksheet Dim misValue As Object = System.Reflection.Missing.Value xlWorkBook = xlApp.Workbooks.Add(misValue) xlWorkSheet = xlWorkBook.Sheets("sheet1") xlWorkSheet.Cells(1, 1) = "Sheet 1 […]