Skip to content

Instantly share code, notes, and snippets.

View AsposeCellsBlog's full-sized avatar

AsposeCellsBlog AsposeCellsBlog

  • http://products.aspose.com/cells/
View GitHub Profile
@AsposeCellsBlog
AsposeCellsBlog / Convert_XLS_to_TabDelimited_in_C#.NET.cs
Created January 20, 2019 11:05
Convert XLS to Tab Delimited in C#.NET
// Directory path for input and output files.
string dirPath = "E:/InputOutputDir/";
// Load input XLS file inside the Aspose.Cells workbook object.
Aspose.Cells.Workbook workbook = new Workbook(dirPath + "InputXLS.xls");
// Save the workbook in output Tab Delimited format.
workbook.Save(dirPath + "OutputTabDelimited.txt", SaveFormat.TabDelimited);
@AsposeCellsBlog
AsposeCellsBlog / Convert_XLS_to_TSV_in_C#.NET.cs
Created January 19, 2019 11:34
Convert XLS to TSV in C#.NET
// Directory path for input and output files.
string dirPath = "E:/InputOutputDir/";
// Load input XLS file inside the Aspose.Cells workbook object.
Aspose.Cells.Workbook workbook = new Workbook(dirPath + "InputXLS.xls");
// Save the workbook in output TSV format.
workbook.Save(dirPath + "OutputTSV.tsv", SaveFormat.TSV);
@AsposeCellsBlog
AsposeCellsBlog / Convert_XLS_to_CSV_in_C#.NET.cs
Created January 19, 2019 07:16
Convert XLS to CSV in C#.NET
// Directory path for input and output files.
string dirPath = "E:/InputOutputDir/";
// Load input XLS file inside the Aspose.Cells workbook object.
Aspose.Cells.Workbook workbook = new Workbook(dirPath + "InputXLS.xls");
// Save the workbook in output CSV format.
workbook.Save(dirPath + "OutputCSV.csv", SaveFormat.CSV);
@AsposeCellsBlog
AsposeCellsBlog / Convert_XLS_to_XLSB_in_C#.NET.cs
Created January 12, 2019 09:20
Convert XLS to XLSB in C#.NET
// Directory path for input and output files.
string dirPath = "E:/InputOutputDir/";
// Load input XLS file inside the Aspose.Cells workbook object.
Aspose.Cells.Workbook workbook = new Workbook(dirPath + "InputXLS.xls");
// Save the workbook in output XLSB format.
workbook.Save(dirPath + "OutputXLSB.xlsb", SaveFormat.Xlsb);
@AsposeCellsBlog
AsposeCellsBlog / Convert_XLS_to_XLSM_in_C#.NET.cs
Created January 10, 2019 14:40
Convert XLS to XLSM in C#.NET
// Directory path for input and output files.
string dirPath = "E:/InputOutputDir/";
// Load input XLS file inside the Aspose.Cells workbook object.
Aspose.Cells.Workbook workbook = new Workbook(dirPath + "InputXLS.xls");
// Save the workbook in output XLSM format.
workbook.Save(dirPath + "OutputXLSM.xlsm", SaveFormat.Xlsm);
@AsposeCellsBlog
AsposeCellsBlog / Convert_XLS_to_XLSX_in_C#.NET.cs
Last active January 10, 2019 14:41
Convert XLS to XLSX in C#.NET
// Directory path for input and output files.
string dirPath = "E:/InputOutputDir/";
// Load input XLS file inside the Aspose.Cells workbook object.
Aspose.Cells.Workbook workbook = new Workbook(dirPath + "InputXLS.xls");
// Save the workbook in output XLSX format.
workbook.Save(dirPath + "OutputXLSX.xlsx", SaveFormat.Xlsx);
@AsposeCellsBlog
AsposeCellsBlog / Create_Microsoft_Excel_Documents_in_Various_Formats.cs
Created December 30, 2018 16:50
Sample Code - C# - Install Aspose.Cells using NuGet in Visual Studio and Create Microsoft Excel Documents in Various Formats
// Directory path where output Excel files will be created.
string dirPath = "E:/OutputDir/";
// Create Aspose.Cells empty workbook object.
Aspose.Cells.Workbook workbook = new Workbook();
// Put some value in cell C4 of first worksheet.
workbook.Worksheets[0].Cells["C4"].PutValue("Welcome to Aspose.Cells API to create and manipulate Excel files!");
// Save the workbook in output XLS format.
@AsposeCellsBlog
AsposeCellsBlog / Center_Align_Excel_Cell.cpp
Created December 15, 2018 01:41
Center Align Excel Cell - C++
// Path of output Excel file
intrusive_ptr<Aspose::Cells::System::String> outputCenterAlignExcelCell = new Aspose::Cells::System::String("D:\\Download\\outputCenterAlignExcelCell.xlsx");
// Create empty Workbook object.
intrusive_ptr<IWorkbook> wb = Factory::CreateIWorkbook();
// Access first worksheet.
intrusive_ptr<Aspose::Cells::IWorksheet> ws = wb->GetIWorksheets()->GetObjectByIndex(0);
// Access cell C4.
@AsposeCellsBlog
AsposeCellsBlog / Center_Align_Excel_Cell.cpp
Created December 15, 2018 01:41
Center Align Excel Cell - C++
// Path of output Excel file
intrusive_ptr<Aspose::Cells::System::String> outputCenterAlignExcelCell = new Aspose::Cells::System::String("D:\\Download\\outputCenterAlignExcelCell.xlsx");
// Create empty Workbook object.
intrusive_ptr<IWorkbook> wb = Factory::CreateIWorkbook();
// Access first worksheet.
intrusive_ptr<Aspose::Cells::IWorksheet> ws = wb->GetIWorksheets()->GetObjectByIndex(0);
// Access cell C4.
@AsposeCellsBlog
AsposeCellsBlog / Center_Align_Excel_Cell.java
Created December 15, 2018 01:27
Center Align Excel Cell - Java
// Create empty Workbook object.
com.aspose.cells.Workbook wb = new com.aspose.cells.Workbook();
// Access first worksheet.
Worksheet ws = wb.getWorksheets().get(0);
// Access cell C4 and add some text inside it.
Cell c4 = ws.getCells().get("C4");
c4.putValue("Aspose File Format APIs");