Acesoft.AceoffixNet
7.3.1.2
dotnet add package Acesoft.AceoffixNet --version 7.3.1.2
NuGet\Install-Package Acesoft.AceoffixNet -Version 7.3.1.2
<PackageReference Include="Acesoft.AceoffixNet" Version="7.3.1.2" />
<PackageVersion Include="Acesoft.AceoffixNet" Version="7.3.1.2" />
<PackageReference Include="Acesoft.AceoffixNet" />
paket add Acesoft.AceoffixNet --version 7.3.1.2
#r "nuget: Acesoft.AceoffixNet, 7.3.1.2"
#:package Acesoft.AceoffixNet@7.3.1.2
#addin nuget:?package=Acesoft.AceoffixNet&version=7.3.1.2
#tool nuget:?package=Acesoft.AceoffixNet&version=7.3.1.2
1. Introduction
Aceoffix For ASP.NET and does not include ASP.NET Core, .NET 5, or any subsequent versions .Enables the embedding of Microsoft Office or WPS in web pages and provides functions such as online editing and saving of Office documents, access to document content, dynamic generation of document tables, control of editable areas, and submission of user input in Word/Excel.
2. How to integrate AceoffixV7 into your web project
- Download the Aceoffix client program.
Copy the program downloaded in the previous step to the "bin" folder of the your web project.
Open this project using Visual Studio. Then right-click on the project folder, and click "Manage NuGet Packages → Browse" in sequence. Enter "Acesoft.AceoffixNet" in the search box and install the latest version.
Please add the following code to the
<handlers>tag in yourWeb.configfile..
<system.webServer>
<handlers>
<add name="aceserver" path="/server.ace" verb="*" type="Aceoffix.AceServer.ServerHandler" />
<add name="aceclient" path="/aceclient" verb="GET" type="Aceoffix.AceServer.ServerHandler" />
<add name="aceoffix" path="/aceoffix.js" verb="GET" type="Aceoffix.AceServer.ServerHandler" />
</handlers>
</system.webServer>
- Add the following code to the parent page of the page which you want to edit Office document. Write the following code in the <head> tag.
<script type="text/javascript" src="aceoffix.js"></script>
Note: The path of aceoffix.js is relative to the root of your website.
Write the following link to pop up an Acebrowser window to edit Office document. We assume that the page which contains Aceoffix control is Word.aspx.
<a href="javascript:AceBrowser.openWindow('Word.aspx', 'width=1200px;height=800px;');" >Open Word File</a>
- Then, write the following server code in Word.aspx.cs.
public Aceoffix.AceoffixCtrl aceCtrl = new Aceoffix.AceoffixCtrl();
protected void Page_Load(object sender, EventArgs e)
{
aceCtrl.SaveFilePage = "SaveFile.aspx";
aceCtrl.WebOpen("doc/editword.docx", Aceoffix.OpenModeType.docNormalEdit, "Tom");
}
- Add a new web page called SaveFile.aspx if your user wants to save document.
protected void Page_Load(object sender, EventArgs e)
{
// This page is used to receive the file saved by AceoffixCtrl.
Aceoffix.FileSaver fs = new Aceoffix.FileSaver();
fs.SaveToFile(Server.MapPath("doc/") + fs.FileName);
fs.Close();
}
- Please continue with the front-end code for the Word.aspx.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Word.aspx.cs" Inherits="Aceoffix_Net_Simple.Word" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Edit Word Demo</title>
</head>
<body>
<script type="text/javascript">
function SaveDoc() {
aceoffixctrl.WebSave();
}
function OnAceoffixCtrlInit() {
aceoffixctrl.AddCustomToolButton("Save", "SaveDoc()", 1);
}
</script>
<div style="width:auto;height:98vh;">
<%=aceCtrl.GetHtml() %>
</div>
</body>
</html>
- When publish the project and access index.html page, follow the prompts to install the Aceoffix V7 client. Once the registration dialog box appears, please enter the license key of Aceoffix V7 to complete the registration.
3. How to get more examples
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net40 is compatible. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.