Skip to content

Commit

Permalink
Update file(s) "/." from "aspose-cells/Aspose.Cells-API-References"
Browse files Browse the repository at this point in the history
  • Loading branch information
peterzhou-aspose committed Dec 25, 2024
1 parent 916b27a commit 6250e52
Show file tree
Hide file tree
Showing 34 changed files with 971 additions and 1 deletion.
2 changes: 1 addition & 1 deletion content/sites/aspose/cells/english/net/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ is_root: true
| [Aspose.Cells.GridWeb](./aspose.cells.gridweb/) | The **Aspose.Cells.GridWeb** namespace contains core classes of web control that can be embeded in ASP.NET web forms to integrate spreadsheet manipulation capabilities without Microsoft Excel. |
| [Aspose.Cells.GridWeb.Data](./aspose.cells.gridweb.data/) | The **Aspose.Cells.GridWeb.Data** namespace contains classes of data control objects such WebWorksheet, GridRow, GridCell, GridPicture, GridPivotTable and more. |
| [Aspose.Cells.GridJs](./aspose.cells.gridjs/) | The **Aspose.Cells.GridJs** namespace encapsulates all classes of GridJs, providing simple APIs for viewing or editing spreadsheet files through JSON operations.. |

| [Aspose.Cells.AI](./aspose.cells.ai/) | The **Aspose.Cells.AI** namespace encapsulates all classes of AI feature, providing APIs for AI-powered spreadsheet processing. |

23 changes: 23 additions & 0 deletions content/sites/aspose/cells/english/net/aspose.cells.ai/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: Aspose.Cells.AI
second_title: Aspose.Cells for .NET API Reference
description:
type: docs
url: /net/aspose.cells.ai/
---


## Classes

| Class | Description |
| --- | --- |
| [CellsAI](./cellsai/) | Represents the main entry class for Cells AI |
| [Config](./config/) | Represents all the settings for Cells AI |
| [Model](./model/) | Represents a AI model |
## Enumeration

| Enumeration | Description |
| --- | --- |
| [LogLevel](./loglevel/) | Log level for Cells AI |


Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: Class CellsAI
second_title: Aspose.Cells for .NET API Reference
description: Aspose.Cells.AI.CellsAI class. Represents the main entry class for Cells AI
type: docs
url: /net/aspose.cells.ai/cellsai/
---
## CellsAI class

Represents the main entry class for Cells AI

```csharp
public class CellsAI
```

## Constructors

| Name | Description |
| --- | --- |
| [CellsAI](cellsai/#constructor_1)(string, string) | Constructor for CellsAI |
| [CellsAI](cellsai/#constructor)(string, bool, string) | Constructor for CellsAI |

## Properties

| Name | Description |
| --- | --- |
| [Proxy](../../aspose.cells.ai/cellsai/proxy/) { get; set; } | Set proxy for CellsAI |

## Methods

| Name | Description |
| --- | --- |
| [BuildSpreadsheet](../../aspose.cells.ai/cellsai/buildspreadsheet/)(stringstring?string) | Build Spreadsheet file with user request |
| [GetExcelFormula](../../aspose.cells.ai/cellsai/getexcelformula/)(stringstring) | Get formula from the spreadsheet |
| [SpreadsheetQuestion](../../aspose.cells.ai/cellsai/spreadsheetquestion/#spreadsheetquestion)(stringstring) | Get answer of the question from the spreadsheet |
| [SpreadsheetQuestion](../../aspose.cells.ai/cellsai/spreadsheetquestion/#spreadsheetquestion_1)(stringstringTextWriter) | Get answer of the question from the spreadsheet,using TextWriter to write the result |
| [SpreadsheetSummarize](../../aspose.cells.ai/cellsai/spreadsheetsummarize/#spreadsheetsummarize)(string) | Get summary of the spreadsheet |
| [SpreadsheetSummarize](../../aspose.cells.ai/cellsai/spreadsheetsummarize/#spreadsheetsummarize_1)(stringTextWriter) | Get summary of the spreadsheet,using TextWriter to write the result |

### See Also

* namespace [Aspose.Cells.AI](../../aspose.cells.ai/)
* assembly [CellsAI](../../)


Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
title: CellsAI.BuildSpreadsheet
second_title: Aspose.Cells for .NET API Reference
description: CellsAI method. Build Spreadsheet file with user request
type: docs
url: /net/aspose.cells.ai/cellsai/buildspreadsheet/
---
## CellsAI.BuildSpreadsheet method

Build Spreadsheet file with user request

```csharp
public Task BuildSpreadsheet(string userRequest, string? inputFile, string outputFile)
```

| Parameter | Type | Description |
| --- | --- | --- |
| userRequest | String | the request description to generate spreadsheet file |
| inputFile | String | the full path of the input file ,it is optional ,if want to modify the file based on this file,we can set it |
| outputFile | String | the full path of the output file |

### Examples

The following examples shos how to build a spreadsheet on demand

```csharp
[C#]
Config.Model=Model.Gpt4OMini;
CellsAI cellsAI = new CellsAI(AIRootUrl, AIKey);
String userRequest = @"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.";
String outfile = "D:\\foodsweekly.xlsx";
await cellsAI.BuildSpreadsheet(userRequest, null, outfile);

String userRequest = @"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.";
String outfile = "D:\\Sales Report Forcast.xlsx";
String inputfile = "D:\\Sales Report Year.xlsx";
await cellsAI.BuildSpreadsheet(userRequest, inputfile, outfile);

String userRequest = "Change the background colors of the rows where the top three highest year sales are located to red, yellow, and green, respectively.";
String outfile = "D:\\Sales Report Top3.xlsx";
String inputfile = "D:\\Sales Report Year.xlsx";
await cellsAI.BuildSpreadsheet(userRequest, inputfile, outfile);

String userRequest = "Add a new column named "Ranking" and fill in the content of this column based on the students' total scores ranking.";
String outfile = "D:\\student_score_with_rank.xlsx";
String inputfile = "D:\\student_score.xlsx";
await cellsAI.BuildSpreadsheet(userRequest, inputfile, outfile);

Config.Model=Model.QwenPlus;
Config.Locale = "zh";
String userRequest ="增加新的一列,列名称是\"排名\" 并根据学生的总分大小排名填入这一列的内容";
String outfile = "D:\\学生排行.xlsx";
String inputfile = "D:\\student_score_zh.xlsx";
await cellsAI.BuildSpreadsheet(userRequest, inputfile, outfile);


String userRequest = "总分成绩最好的学生所在的行背景色改为绿色,成绩最差的学生的背景色改为黄色,把分数不及格的单元格用红色标记出来";
String outfile = "D:\\学生排行信息.xlsx";
String inputfile = "D:\\student_score_zh.xlsx";
await cellsAI.BuildSpreadsheet(userRequest, inputfile, outfile);
```

### See Also

* class [CellsAI](../)
* namespace [Aspose.Cells.AI](../../../aspose.cells.ai/)
* assembly [CellsAI](../../../)


Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: CellsAI.CellsAI
second_title: Aspose.Cells for .NET API Reference
description: CellsAI constructor. Constructor for CellsAI
type: docs
url: /net/aspose.cells.ai/cellsai/cellsai/
---
## CellsAI(string, string) {#constructor_1}

Constructor for CellsAI

```csharp
public CellsAI(string uri, string key)
```

| Parameter | Type | Description |
| --- | --- | --- |
| uri | String | the AI API url |
| key | String | the AI API key |

### See Also

* class [CellsAI](../)
* namespace [Aspose.Cells.AI](../../../aspose.cells.ai/)
* assembly [CellsAI](../../../)

---

## CellsAI(string, bool, string) {#constructor}

Constructor for CellsAI

```csharp
public CellsAI(string uri, bool isFullUri, string key)
```

| Parameter | Type | Description |
| --- | --- | --- |
| uri | String | the AI API url |
| isFullUri | Boolean | whether this is a full url of AI API,for example,if uri= https://api.openai.com/v1/chat/completions and isFullUri=true,we will use this uri directly,if uri=https://api.openai.com/ and isFullUri=false,we will generate the default full uri to https://api.openai.com/v1/chat/completions |
| key | String | the AI API key |

### See Also

* class [CellsAI](../)
* namespace [Aspose.Cells.AI](../../../aspose.cells.ai/)
* assembly [CellsAI](../../../)


Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
title: CellsAI.GetExcelFormula
second_title: Aspose.Cells for .NET API Reference
description: CellsAI method. Get formula from the spreadsheet
type: docs
url: /net/aspose.cells.ai/cellsai/getexcelformula/
---
## CellsAI.GetExcelFormula method

Get formula from the spreadsheet

```csharp
public string GetExcelFormula(string path, string question)
```

| Parameter | Type | Description |
| --- | --- | --- |
| path | String | the file path |
| question | String | the question |

### Return Value

the formula

### See Also

* class [CellsAI](../)
* namespace [Aspose.Cells.AI](../../../aspose.cells.ai/)
* assembly [CellsAI](../../../)


Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: CellsAI.Proxy
second_title: Aspose.Cells for .NET API Reference
description: CellsAI property. Set proxy for CellsAI
type: docs
url: /net/aspose.cells.ai/cellsai/proxy/
---
## CellsAI.Proxy property

Set proxy for CellsAI

```csharp
public WebProxy Proxy { get; set; }
```

### See Also

* class [CellsAI](../)
* namespace [Aspose.Cells.AI](../../../aspose.cells.ai/)
* assembly [CellsAI](../../../)


Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
title: CellsAI.SpreadsheetQuestion
second_title: Aspose.Cells for .NET API Reference
description: CellsAI method. Get answer of the question from the spreadsheetusing TextWriter to write the result
type: docs
url: /net/aspose.cells.ai/cellsai/spreadsheetquestion/
---
## SpreadsheetQuestion(string, string, TextWriter) {#spreadsheetquestion_1}

Get answer of the question from the spreadsheet,using TextWriter to write the result

```csharp
public Task SpreadsheetQuestion(string path, string question, TextWriter writer)
```

| Parameter | Type | Description |
| --- | --- | --- |
| path | String | the file path |
| question | String | the question |
| writer | TextWriter | the TextWriter to write the result |

### See Also

* class [CellsAI](../)
* namespace [Aspose.Cells.AI](../../../aspose.cells.ai/)
* assembly [CellsAI](../../../)

---

## SpreadsheetQuestion(string, string) {#spreadsheetquestion}

Get answer of the question from the spreadsheet

```csharp
public string SpreadsheetQuestion(string path, string question)
```

| Parameter | Type | Description |
| --- | --- | --- |
| path | String | the file path |
| question | String | the question |

### Return Value

AI query response

### Examples

```csharp
[C#]
CellsAI cellsAI = new CellsAI(AIRootUrl, AIKey);
String question = @"Which year had the highest total sales revenue?";
String path = "D:\\sales_report.xlsx";
String ret= cellsAI.SpreadsheetQuestion(path, question);
```

### See Also

* class [CellsAI](../)
* namespace [Aspose.Cells.AI](../../../aspose.cells.ai/)
* assembly [CellsAI](../../../)


Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
title: CellsAI.SpreadsheetSummarize
second_title: Aspose.Cells for .NET API Reference
description: CellsAI method. Get summary of the spreadsheet
type: docs
url: /net/aspose.cells.ai/cellsai/spreadsheetsummarize/
---
## SpreadsheetSummarize(string) {#spreadsheetsummarize}

Get summary of the spreadsheet

```csharp
public string SpreadsheetSummarize(string path)
```

| Parameter | Type | Description |
| --- | --- | --- |
| path | String | the file path |

### Return Value

AI query response

### See Also

* class [CellsAI](../)
* namespace [Aspose.Cells.AI](../../../aspose.cells.ai/)
* assembly [CellsAI](../../../)

---

## SpreadsheetSummarize(string, TextWriter) {#spreadsheetsummarize_1}

Get summary of the spreadsheet,using TextWriter to write the result

```csharp
public Task SpreadsheetSummarize(string path, TextWriter writer)
```

| Parameter | Type | Description |
| --- | --- | --- |
| path | String | the file path |
| writer | TextWriter | the TextWriter to write the result |

### See Also

* class [CellsAI](../)
* namespace [Aspose.Cells.AI](../../../aspose.cells.ai/)
* assembly [CellsAI](../../../)


Loading

0 comments on commit 6250e52

Please sign in to comment.