我只想点击按钮或超链接打开它。它不想在我的程序中打开它
答案 0 :(得分:0)
如果你不想在你的应用程序中打开它,这意味着你将使用office应用程序打开它。
既然你没有提到你使用的编程语言(我猜测,从wpf标签,一些Visual Studio语言)作为<script>
$(document).ready(function() {
$('#detailTable').DataTable();
});
</script>
<!-- <link rel="stylesheet" type="text/css" href="{% static 'inventory/detailStyle.css' %}" />-->
<h1>{{ inventory.inventory_name }}</h1>
<table cellpadding="1" cellspacing="1" id="detailTable">
<thead>
<th>NAME</th>
<th>STATUS</th>
<th>DERIVATIVES</th>
<th>SUBSYSTEMS</th>
</thead>
<tbody>{% for block in inventory.block_set.all %}
<tr>
<td>{{ block.block_name }}</td>
<td>{{ block.block_status }}</td>
<td>{{ block.block_derivatives }}</td>
<td>{{ block.block_subsystems }}</td>
</tr>{% endfor %}</tbody>
</table>
<div> <a href="{% url 'inventory:requests' inventory.id %}">Request Form</a>
</div>
状态
表示c#
https://msdn.microsoft.com/en-us/library/tcyt0y1f.aspx
和VB
this.Application.Documents.Open(@"c:\users\testdocument.doc");
将其打开为只读
C#
Me.Application.Documents.Open("c:\users\testdocument.doc")
VB
this.Application.Documents.Open(@"c:\users\testdocument.doc", ReadOnly:true);