Aspose.Cells.AI
24.12.1
dotnet add package Aspose.Cells.AI --version 24.12.1
NuGet\Install-Package Aspose.Cells.AI -Version 24.12.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Aspose.Cells.AI" Version="24.12.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Aspose.Cells.AI" Version="24.12.1" />
<PackageReference Include="Aspose.Cells.AI" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Aspose.Cells.AI --version 24.12.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Aspose.Cells.AI, 24.12.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Aspose.Cells.AI&version=24.12.1
#tool nuget:?package=Aspose.Cells.AI&version=24.12.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
.NET Library to Process Spreadsheets With AI
Aspose.Cells.AI is a .NET library enables seamless integration with large language models (LLMs) such as OpenAI and Gemini, offering support for AI-driven spreadsheet processing..
Working with Cells AI
Configure AI Model
//Setup a new AI model
Config.Model = new Model("gpt-4-32k");
//Or use predefined AI model
Config.Model=Model.Gpt4OMini;
Create AI instance
//Init with AI chat root url
String APIKey="sk-xxxxx";
String APIRootUrl="https://api.openai.com/";
CellsAI cellsAI = new CellsAI(APIRootUrl, APIKey);
//Or init with AI chat full url
String FullAPIRootUrl="https://generativelanguage.googleapis.com/v1beta/openai/chat/completions";
CellsAI cellsAI = new CellsAI(FullAPIRootUrl,true,APIKey);
Use AI power to process file
//Get summary of the spreadsheet
String summary=cellsAI.SpreadsheetSummarize("c:/student.xlsx");
//Use TextWriter way
TextWriter writer = Console.Out;
await cellsAI.SpreadsheetSummarize("c:/student.xlsx",writer);
//Question for the spreadsheet
await cellsAI.SpreadsheetQuestion("c:/student.xlsx","who is the best student",writer);
//Build Spreadsheet file with user request
await cellsAI.BuildSpreadsheet("Provide weekly daily three-meal recipes, including nutritional value, preparation methods, ingredients, and cost ,one day per row,and add total cost at last row.", null, "c:/foodsweekly.xlsx");
await cellsAI.BuildSpreadsheet("Based on the sales history data from row 3 to row 10, predict the sales situation for the next year.add it in row 11.", "c:/Sales Report Year.xlsx", "c:/Sales Report Forcast.xlsx");
await cellsAI.BuildSpreadsheet("Add a new column named \"Ranking\" and fill in the content of this column based on the students' total scores ranking", "c:\\student_score.xlsx", "c:\\student_score_with_rank.xlsx");
//use alibaba qianwen AI model
Config.Model=Model.QwenPlus;
//set locale info
Config.Locale = "zh";
String userRequest ="增加新的一列,列名称是\"排名\" 并根据学生的总分大小排名填入这一列的内容";
String outfile = "D:\\学生排行.xlsx";
String inputfile = "D:\\student_score_zh.xlsx";
await cellsAI.BuildSpreadsheet(userRequest, inputfile, outfile);
userRequest = "总分成绩最好的学生所在的行背景色改为绿色,成绩最差的学生的背景色改为黄色,把分数不及格的单元格用红色标记出来";
outfile = "D:\\学生排行信息.xlsx";
await cellsAI.BuildSpreadsheet(userRequest, inputfile, outfile);
// Get formula from the spreadsheet
String formula=cellsAI.GetExcelFormula("c:/student.xlsx","get the total score for xiaomin");
Use Proxy setting if you cannot access the AI server directly
//Init WebProxy setting
string proxyAddress = "http://127.0.0.1:58591";
WebProxy proxy = new WebProxy(proxyAddress)
{
BypassProxyOnLocal = false,
UseDefaultCredentials = false,
};
//set up proxy for Cells AI
cellsAI.Proxy = proxy;
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0-windows7.0 is compatible. net7.0-windows was computed. net8.0-windows was computed. net9.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0-windows7.0
- Aspose.Cells (>= 24.12.0)
- Microsoft.CodeAnalysis.CSharp (>= 4.11.0)
- Microsoft.Extensions.Http (>= 8.0.0)
- Newtonsoft.Json (>= 13.0.3)
- System.Drawing.Common (>= 6.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.