using Aspose.Cells;
namespace ConsoleApp17
{
public class WriteUsingLightCellsAPI
{
public static void Run()
{
// The path To the documents direcTory.
var fileName = $“F:\temp\{DateTime.Now:yyyyMMHHmmss}.Xls”;
…...Use LightCells API build xls ,throw Exception Object reference...$“F:\temp\{DateTime.Now:yyyyMMHHmmss}.xls”; // Specify your desired matrix...