Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
services.AddScoped<IGridJsService, GridJsService>();
You can choose any of the following ways:
Option 1: Set GridJsOptions in ConfigureServices in Startup.cs
services.Configure<GridJsOptions>(options =>
{
options.FileCacheDirectory = TestConfig.TempDir;
});
Option 2: Directly set the static property
Config.FileCacheDirectory = TestConfig.TempDir;
Option 3: Define your own cache storage rule by implementing GridCacheForStream
For local file storage, here is an example:
For server‑side storage, we also provide an example. Please check:
For more details about storage, please refer to this guide
GridJsControllerBasepublic class GridJs2Controller : GridJsControllerBase
There are two ways to get JSON data in your action:
Option 1: Using GridJsWorkbook
GridJsWorkbook wbj = new GridJsWorkbook();
Workbook wb = new Workbook(fullFilePath);
wbj.ImportExcelFile(wb);
string ret = wbj.ExportToJson(fileName);
Option 2: Using IGridJsService in GridJsControllerBase
string uid = GridJsWorkbook.GetUidForFile(fileName);
StringBuilder ret = _gridJsService.DetailFileJsonWithUid(fullFilePath, uid);
For detailed info, you can check the example here:
https://github.com/aspose-cells/Aspose.Cells.Grid-for-.NET/tree/master/Examples_GridJs
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.