Aceoffix For ASP.NET Core and does not cover the ASP.NET Framework. It supports .NET Core 3.1, as well as .NET 5 and later 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.
License
—
Deps
0
Install Size
—
Vulns
✓ 0
Published
Mar 2, 2026
$ dotnet add package Acesoft.AceoffixAceoffix For ASP.NET Core and does not cover the ASP.NET Framework. It supports .NET Core 3.1, as well as .NET 5 and later 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.
Open this project using Visual Studio. Then right-click on the project folder, and click "Manage NuGet Packages -> Browse" in sequence. Enter "Acesoft.Aceoffix" in the search box and install the latest version.
Download the Aceoffix client program.
Copy the program downloaded in the previous step to the root directory of your project. Then, in Visual Studio, right - click on the program and change the value of "Properties -> Copy to Output Directory" to "Copy always".
Add the following code to your project Program.cs file.
builder.Services.AddAceoffixAcewServer();//Available starting from Aceoffix v7.3.1.1
Add the following code to your project Program.cs file.
//Note: These two lines of code must be placed before app.UseRouting().
app.UseAceoffixAcewServer();//Available starting from Aceoffix v7.3.1.1
app.UseMiddleware<AceoffixNetCore.AceServer.ServerHandlerMiddleware>();
Reference aceoffix.js in the <head> tag of the _Layout.cshtml page of your project.
<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 "Views/Home/Index.cshtml".
<a href="javascript:AceBrowser.openWindow('Word/Index', 'width=1150px;height=900px;');">Open Word File</a>
public IActionResult Index()
{
AceoffixNetCore.AceoffixCtrl aceCtrl= new AceoffixNetCore.AceoffixCtrl(Request);
aceCtrl.SaveFilePage = "Save";
aceCtrl.WebOpen("/doc/editword.docx", AceoffixNetCore.OpenModeType.docNormalEdit, "tom");
ViewBag.aceCtrl = aceCtrl.GetHtml();
return View();
}
public async Task<ActionResult> Save()
{
AceoffixNetCore.FileSaver fs = new AceoffixNetCore.FileSaver(Request, Response);
await fs.LoadAsync();
string webRootPath = _webHostEnvironment.WebRootPath;
fs.SaveToFile(webRootPath + "/doc/" + fs.FileName);
return fs.Close();
}
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<script type="text/javascript">
function SaveDoc() {
aceoffixctrl.WebSave();
}
function OnAceoffixCtrlInit() {
aceoffixctrl.AddCustomToolButton("Save", "SaveDoc()", 1);
}
</script>
</head>
<body>
<div style=" width:auto; height:98vh;">
@Html.Raw(ViewBag.aceCtrl)
</div>
</body>
</html>