Giter VIP home page Giter VIP logo

aspose.cells-for-.net's Introduction

Nuget Nuget GitHub

.NET API for Excel Files

Aspose.Cells for .NET is an Excel Spreadsheet Programming API to speed up spreadsheet management and processing tasks. Excel .NET API supports to build cross-platform applications having the ability to generate, modify, convert, render and print spreadsheets.

Aspose.Cells for .NET also provides two GUI based .NET controls. Aspose.Cells.GridDesktop supports desktop applications and Aspose.Cells.GridWeb is specifically designed for .NET based web applications. Both Gird controls allow to import/export Excel files, manipulate data & formatting, customize grid design and layout, manage multiple worksheets, create and calculate Excel formulas and numerous other Excel-like operations.

Directory Description
Demos Source for the live demos hosted at https://products.aspose.app/cells/family.
Examples A collection of .NET examples that help you learn and explore the API features.
Examples of GridDesktop A collection of .NET examples that help you learn and use Aspose.Cells.GridDesktop.
Examples of GridWeb A collection of .NET examples that help you learn and use Aspose.Cells.GridWeb.
Plugins Visual Studio plugins of Aspose.Cells for .NET.

Spreadsheet Processing via .NET

  • Spreadsheet generation & manipulation via API.
  • High quality file format conversion & rendering.
  • Print Microsoft Excel files to physical or virtual printers.
  • Combine, modify, protect or parse Excel sheets.
  • Apply worksheet formatting.
  • Configure and apply page setup for the worksheets.
  • Create & customize Excel charts, Pivot Tables, conditional formatting rules, slicers, tables & spark-lines.
  • Convert Excel charts to images & PDF.
  • Convert Excel files to various other formats.
  • Formula calculation engine that supports all basic and advanced Excel functions.

Read & Write Spreadsheet Formats

Microsoft Excel: XLS, XLSX, XLSB, XLT, XLTX, XLTM, XLSM, XML
OpenOffice: ODS
Text: CSV, TSV
Web: HTML, MHTML
Numbers: Apple's iWork office suite Numbers app documents

Save Excel Files As

Fixed Layout: PDF, PDF/A, XPS
Data Interchange: DIF
Images: JPEG, PNG, BMP, SVG, TIFF, EMF, GIF

Platform Independence

Aspose.Cells for .NET can be used to build ASP.NET, Web Services, WinForms or other .NET applications for framework 2.0 or later on 32-bit and 64-bit operating systems. It also provides dedicated assemblies for Xamarin.Android (for native Android apps), Xamarin.iOS (for native iOS apps), COM (for pre-.NET technologies), Mono, and Windows Azure.

Get Started with Aspose.Cells for .NET

Are you ready to give Aspose.Cells for .NET a try? Simply execute Install-Package Aspose.Cells from Package Manager Console in Visual Studio to fetch the NuGet package. If you already have Aspose.Cells for .NET and want to upgrade the version, please execute Update-Package Aspose.Cells to get the latest version.

Create XLSX Excel File from Scratch

// initiate an instance of Workbook
var book = new Aspose.Cells.Workbook();
// access first (default) worksheet
var sheet = book.Worksheets[0];
// access CellsCollection of first worksheet
var cells = sheet.Cells;
// write HelloWorld to cells A1
cells["A1"].Value = "Hello World";
// save spreadsheet to disc
book.Save("output.xlsx", SaveFormat.Xlsx);

Convert Excel Files to PDF, XPS & HTML

Aspose.Cells for .NET is capable of converting spreadsheets to numerous other popular formats including PDF, XPS & HTML formats while maintaining the highest visual fidelity. The conversion process is simple, configurable and reliable.

// load file to be converted
var workbook = new Aspose.Cells.Workbook(dir + "template.xlsx");
// save in different formats
workbook.Save(dir + "output.pdf", Aspose.Cells.SaveFormat.Pdf);
workbook.Save(dir + "output.xps", Aspose.Cells.SaveFormat.XPS);
workbook.Save(dir + "output.html", Aspose.Cells.SaveFormat.Html);

Encrypt Excel Spreadsheet

var workbook = new Aspose.Cells.Workbook(dir+ "template.xls");

// specify XOR encryption type
workbook.SetEncryptionOptions(EncryptionType.XOR, 40);

// specify strong encryption type (RC4,Microsoft Strong Cryptographic Provider)
workbook.SetEncryptionOptions(EncryptionType.StrongCryptographicProvider, 128);

// protect the file
workbook.Settings.Password = "1234";

// save the file
workbook.Save(dir+ "output.xls");

Create an Excel Line Chart

var workbook = new Aspose.Cells.Workbook();

// add a new worksheet to the Excel object
int sheetIndex = workbook.Worksheets.Add();

// obtain the reference of the newly added worksheet by passing its sheet index
Worksheet worksheet = workbook.Worksheets[sheetIndex];

// add sample values to cells
worksheet.Cells["A1"].PutValue(50);
worksheet.Cells["A2"].PutValue(100);
worksheet.Cells["A3"].PutValue(150);
worksheet.Cells["B1"].PutValue(4);
worksheet.Cells["B2"].PutValue(20);
worksheet.Cells["B3"].PutValue(50);

// add a chart to the worksheet
int chartIndex = worksheet.Charts.Add(Aspose.Cells.Charts.ChartType.Line, 5, 0, 15, 5);

// access the instance of the newly added chart
var chart = worksheet.Charts[chartIndex];

// add chart data source from "A1" to "B3"
chart.NSeries.Add("A1:B3", true);

// save the Excel file
workbook.Save( dir + "output.xls");

Home | Product Page | Docs | Demos | API Reference | Examples | Blog | Search | Free Support | Temporary License

aspose.cells-for-.net's People

Contributors

aamirwaseem avatar adam-skelton avatar ahmad-chishti avatar ahsaniqbalsidiqui avatar amjad-sahi avatar asadalikhan90 avatar aspose-cells-gists avatar asposemarketplace avatar assadvirgo avatar babar-raza avatar farooqsheikhpk avatar fatimaahmed avatar imranrafique avatar iqbal-aspose avatar jawadaspose avatar johnhe998 avatar maria-shahid-aspose avatar muhammad-ijaz avatar naeem244 avatar nesterenes avatar nickliuaspose avatar peterzhou-aspose avatar rizwanniazigroupdocs avatar saqib-razzaq-aspose avatar saqibmasood avatar saqibrazzaq avatar shakeel-faiz avatar simonzhaoaspose avatar wanghaozhu-aspose avatar zaheertariq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aspose.cells-for-.net's Issues

rgba(255 is not a valid value for Int32

I want to put an html string to a workbook cell (with some html element contains rgba in css style) ,and then I use HtmlString, but this operate throw a error about rgba(255 is not a valid value for Int32
The version I have using is Aspose.Cells 19.4.0

//Datatable data

for (int i = 0; i < rows; i++)
{
    for (int k = 0; k < columns; k++)
    {
        cells[1 + i, k].HtmlString = data.Rows[i][k].ToString();
        cells[1 + i, k].SetStyle(style);
    }
}       

Width of column not changing after setting the cells set width property

I tried the following ways to change the width of second column in my worksheet.But nothing worked.I seee that hte width is still the same as before. Is there something I am missing?

w.Cells.SetColumnWidthPixel(2, 10);
w.Cells.SetColumnWidthInch(2, 10);
w.Cells.SetColumnWidth(2, 10);

Copy Worksheet between Workbooks doesn't work with Ranges

when copying a worksheet from a workbook that has named ranges to another workbook, the Named Ranges get copied but when you try

var sourceFile= new Workbook(@"c:\test1.xlsx");
var destinationFile= new Workbook(@"c:\test2.xlsx");

var newSheetIndex = destinationFile.Worksheets.Add();workbook.Worksheets.GetRangeByName
using (var newSheet = destinationFile.Worksheets[newSheetIndex])
{
                newSheet.Copy(sourceFile.Worksheets[sourceSheetIndex]);               
                destinationFile.Save(@"c:\test2.xlsx");
}
var range = destinationFile.Worksheets.GetRangeByName(rangeName);

throws a null exception at the GetRangeByName call.
also, if you look at the newly created worksheet, it's Workbook property is set to null

Unable to Export to Excel using Aspose.cells.dll

Hi Team,

I am unable to export the data in an .xlsx. The data size is huge(around 25000 and above). I tried 2 cells dlls. (8.5.1.0 and 8.8.2.0) .

Source: Aspose.Cells
TargetSite: Void AutoFitColumn(Int32)
Message: Invalid column index.

Attaching the code snippet and blank page snap.

Please assist
code snippet.txt
snap

Can't encrypt excel's specific sheet using c#

hi,

i use below code to encrypt excel's specific sheet, but not work, for Workbook, i can encrypt successfully:

        string excelFile = Path.Combine(currentDirectory, "test.xlsx");
        string encryptedfile = Path.Combine(currentDirectory, "encryptedtest.xlsx");
        Workbook workbook = new Workbook(excelFile);
        workbook.Worksheets[0].Protect(ProtectionType.All, "1234", "");
        // Save the excel file
        workbook.Save(encryptedfile);

so what should i use to let it work, i use aspost.cells version as below:
Aspose.Cells: 20.11.0
OS: Windows10

Unable to run GridWeb.Net6 examples or follow the guide

I am getting many errors when running the GridWeb.Net6 sample such as

In GridController.cs

  1. The type or namespace name 'AcwController' does not exist in the namespace 'Aspose.Cells.GridWeb' (are you missing an assembly reference?)

  2. An object reference is required for the non-static field, method, or property 'MainWeb.SessionStorePath' GridWeb.Demo.NET6.0

  3. Reference to type 'WebControl' claims it is defined in 'System.Web', but it could not be found

Steps to reproduce:

  1. Download the repo
  2. Navigate to folder "Aspose.Cells-for-.NET-master\Examples_GridWeb\GridWeb.Net6"
  3. Open "GridWeb.Demo.NET6.0.csproj" in VS2022
  4. build the solution

image

Is there anything i need to import or install in order to run this example?

I also tried to follow the guide below but got the same issues as the sample
https://docs.aspose.com/cells/net/how-to-use-aspose-cells-gridweb-with-net-core/

Source File SaveSXCFiles.cs Missing

On compile, the error appears that a file is missing: ...\Aspose.Cells-for-.NET-master\Aspose.Cells-for-.NET-master\Examples\CSharp\Files\Handling\SaveSXCFiles.cs' could not be found.

How to expand colums to print area

Dear,

I have an excel template with 12 columns for header with different widths.

I need to hide header column if all rows after my header row are empty, so my exported files could contains any titles between 1 and 12 titles.

I manage to do the hiding part by dynamically checking my conditions and let's say that I have columns A, B, C with titles.

How to expand my content to the column M (limit of my printing area) with autoMerge cell with the good individual width to allow all rows next to be display correctly if I have a 500 letters text to display in the colum C for example.
Just to prevent all my columns to occupy only 20% of the width and not 100%.

Thanks for your help

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.